PHPackages                             litstack/wikipedia - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. litstack/wikipedia

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

litstack/wikipedia
==================

v0.7(8mo ago)0210MITPHPPHP ^8.0

Since Jun 24Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/litstack/wikipedia-field)[ Packagist](https://packagist.org/packages/litstack/wikipedia)[ RSS](/packages/litstack-wikipedia/feed)WikiDiscussions main Synced today

READMEChangelog (7)Dependencies (2)Versions (9)Used By (0)

Wikipedia-Field
===============

[](#wikipedia-field)

Use Wikipedia as the source for your content.

Config
------

[](#config)

You can configure the cache time by adding the `wikipedia` settings to the `fields` key in your `config/lit.php`

```
'fields' => [
    // ...
    'wikipedia' => [
        'cache_ttl' => 60 * 60 * 24,
    ],
],
```

Usage
-----

[](#usage)

The wikipedia formfield is used as follows:

```
$form->wikipedia('wiki');
```

In your Model you need to provide a json column wich is cast properly:

```
// in your model
protected $casts = [
    'wiki' => 'json',
];
```

If you want to disable the `section` or `chars` inputs you can do it as follows:

```
$form->wikipedia('wiki')->section(false)->chars(false);
```

### Displaying Content

[](#displaying-content)

In order to load the content of a wikipedia article you can use the `Wikipedia` facade.

```
// will output the first 'intro' section of the article
Wikipedia::load('https://en.wikipedia.org/wiki/PHP');
```

You can also select a specific section:

```
// will output the 'Mascot' section.
Wikipedia::load('https://en.wikipedia.org/wiki/PHP', 'Mascot');
```

You might as well set a maximum amout of characters:

```
// will output the first 100 chars of the 'Mascot' section.
Wikipedia::load('https://en.wikipedia.org/wiki/PHP', 'Mascot', 100);
```

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance58

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~269 days

Recently: every ~403 days

Total

7

Last Release

266d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29352871?v=4)[Lennart Carstens-Behrens](/maintainers/cbl)[@cbl](https://github.com/cbl)

![](https://www.gravatar.com/avatar/7b2d65d58480dd7fdbf4f4593158cbd0634550ee9210c49957cc48c8a8ccaef6?d=identicon)[jannescb](/maintainers/jannescb)

---

Top Contributors

[![jannescb](https://avatars.githubusercontent.com/u/17292622?v=4)](https://github.com/jannescb "jannescb (17 commits)")[![lpheller](https://avatars.githubusercontent.com/u/36259611?v=4)](https://github.com/lpheller "lpheller (2 commits)")

### Embed Badge

![Health badge](/badges/litstack-wikipedia/health.svg)

```
[![Health](https://phpackages.com/badges/litstack-wikipedia/health.svg)](https://phpackages.com/packages/litstack-wikipedia)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k832.6k54](/packages/neuron-core-neuron-ai)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

762297.9k53](/packages/civicrm-civicrm-core)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.3M49](/packages/tencentcloud-tencentcloud-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

353.6k](/packages/eslazarev-wildberries-sdk)[oat-sa/tao-core

TAO core extension

64147.9k151](/packages/oat-sa-tao-core)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

265.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
