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. litstack/wikipedia

ActiveLibrary

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

v0.7(5mo ago)0208MITPHPPHP ^8.0

Since Jun 24Pushed 5mo ago1 watchersCompare

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

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

38

—

LowBetter than 85% of packages

Maintenance70

Regular maintenance activity

Popularity11

Limited adoption so far

Community9

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

175d ago

### Community

Maintainers

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

---

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.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

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

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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