PHPackages                             unicodeveloper/laravel-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. unicodeveloper/laravel-wikipedia

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

unicodeveloper/laravel-wikipedia
================================

Laravel 5 Bridge for Wikipedia

1.0.0(10y ago)262887MITPHPPHP &gt;=5.3.0

Since Nov 4Pushed 10y ago1 watchersCompare

[ Source](https://github.com/unicodeveloper/laravel-wikipedia)[ Packagist](https://packagist.org/packages/unicodeveloper/laravel-wikipedia)[ Docs](https://twitter.com/unicodeveloper)[ RSS](/packages/unicodeveloper-laravel-wikipedia/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

laravel-wikipedia
=================

[](#laravel-wikipedia)

[![Latest Stable Version](https://camo.githubusercontent.com/fb6318cde350554502f8ee7e0e21dfc8a43ad985b2342d6d1c3f721cae73d51f/68747470733a2f2f706f7365722e707567782e6f72672f756e69636f646576656c6f7065722f6c61726176656c2d77696b6970656469612f762f737461626c652e737667)](https://packagist.org/packages/unicodeveloper/laravel-wikipedia)[![](https://camo.githubusercontent.com/984f6792e3d81e34b782c12770dfd5e6153ea75f5e71d8e668933b988ba1a81f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f756e69636f646576656c6f7065722d617070726f7665642d627269676874677265656e2e737667)](https://camo.githubusercontent.com/984f6792e3d81e34b782c12770dfd5e6153ea75f5e71d8e668933b988ba1a81f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f756e69636f646576656c6f7065722d617070726f7665642d627269676874677265656e2e737667)[![License](https://camo.githubusercontent.com/56c8171354a4835674a19a6cb67539980490a51c195880157bacb84eb17ebd88/68747470733a2f2f706f7365722e707567782e6f72672f756e69636f646576656c6f7065722f6c61726176656c2d77696b6970656469612f6c6963656e73652e737667)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/64b0bc2f081e056152ccd6d88b59344cc37e2094fdce10d0c269fb44f50ba668/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f756e69636f646576656c6f7065722f6c61726176656c2d77696b6970656469612e737667)](https://travis-ci.org/unicodeveloper/laravel-wikipedia)[![Build Status](https://camo.githubusercontent.com/7e425f837553727e61227fe3e75e777690782e03db1b059e4b680f84bd25c16e/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f616e64656c612d6b6572696e6f736f2f6c61726176656c2d77696b6970656469612e737667)](https://travis-ci.org/andela-kerinoso/laravel-wikipedia)[![Quality Score](https://camo.githubusercontent.com/648108d9517550b00a06a4150e51bbd7252580dc2d1f27a85884b5706eb57603/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f756e69636f646576656c6f7065722f6c61726176656c2d77696b6970656469612e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/unicodeveloper/laravel-wikipedia)[![Total Downloads](https://camo.githubusercontent.com/f1a26c867cf2deb7c083910387822a92bdaa6af3bf5687ab1f4fc8bd52733294/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f756e69636f646576656c6f7065722f6c61726176656c2d77696b6970656469612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/unicodeveloper/laravel-wikipedia)

> Laravel Package to work with Wikipedia. Very easy to use. Offers the use of Facades and Dependency Injection

Installation
------------

[](#installation)

[PHP](https://php.net) 5.5+ or [HHVM](http://hhvm.com) 3.3+, and [Composer](https://getcomposer.org) are required.

First, pull in the package through Composer.

```
$ composer require unicodeveloper/laravel-wikipedia
```

Another alternative is to simply add the following line to the require block of your `composer.json` file.

```
"unicodeveloper/laravel-wikipedia": "1.0.*"

```

Then run `composer install` or `composer update` to download it and have the autoloader updated.

And then include these service providers within `config/app.php`

```
'providers' => [
    ...
    Unicodeveloper\Larapedia\WikiRandServiceProvider::class,
    ...
];
```

This package also comes with a Facade

```
'aliases' => [
    ...
    'WikiRand' => Unicodeveloper\Larapedia\WikiRandFacade::class,
    ...
]
```

Run the following command, it creates a `config/wikirand.php` in your laravel app. You can modify the configuration

```
    php artisan vendor:publish
```

Usage
-----

[](#usage)

Use it like so:

For those that love Facades immensely, I have provided the cake for you 😄 like so:

```
{{ WikiRand::getFirstSentence() }}  // returns 5321 Jagras è un asteroide della fascia principale.

{{ WikiRand::getApiLanguage() }} // returns it

{{ WikiRand::getId() }} // returns 812464

{{ WikiRand::getTitle() }} // returns 5321 Jagras

{{ WikiRand::getLink() }} // returns http://it.wikipedia.org/wiki/5321_Jagras

{{ WikiRand::getNChar(25) }} // 5321 Jagras è un asteroide...

{{ WikiRand::getCategoriesRelated() }}
// returns
array(3) {
      [0]=> string(42) "Asteroidi della fascia principale centrale"
      [1]=> string(31) "Corpi celesti scoperti nel 1985"
      [2]=> string(16) "Stub - asteroidi"
}

{{ WikiRand::getOtherLangLinks() }}
// returns
array(10)
      { [0]=> array(3)
        { ["lang"]=> string(2) "en"
          ["url"]=> string(40) "http://en.wikipedia.org/wiki/5321_Jagras"
          ["*"]=> string(11) "5321 Jagras" }
        [1]=> array(3) {
          ["lang"]=> string(2) "eo"
          ["url"]=> string(41) "http://eo.wikipedia.org/wiki/5321_Jagraso"
          ["*"]=> string(12) "5321 Jagraso" }
        [2]=> array(3) {
          ["lang"]=> string(2) "fa"
          ["url"]=> string(84) "http://fa.wikipedia.org/wiki/%D8%B3%DB%8C%D8%A7%D8%B1%DA%A9_%DB%B5%DB%B3%DB%B2%DB%B1"               ["*"]=> string(19) "سیا" }
        [3]=> array(3) {
          ["lang"]=> string(2) "hu"
          ["url"]=> string(40) "http://hu.wikipedia.org/wiki/5321_Jagras"
          ["*"]=> string(11) "5321 Jagras" }
        [4]=> array(3) {
          ["lang"]=> string(2) "hy"
          ["url"]=> string(72) "http://hy.wikipedia.org/wiki/(5321)_%D5%8B%D5%A1%D5%A3%D6%80%D5%A1%D5%BD"
          ["*"]=> string(19) "(5321) Ջագրաս" }
        [5]=> array(3) {
          ["lang"]=> string(2) "la"
          ["url"]=> string(40) "http://la.wikipedia.org/wiki/5321_Jagras"
          ["*"]=> string(11) "5321 Jagras" }
        [6]=> array(3) {
          ["lang"]=> string(2) "oc"
          ["url"]=> string(40) "http://oc.wikipedia.org/wiki/5321_Jagras"
          ["*"]=> string(11) "5321 Jagras" }
        [7]=> array(3) {
          ["lang"]=> string(2) "pl"
          ["url"]=> string(42) "http://pl.wikipedia.org/wiki/(5321)_Jagras"
          ["*"]=> string(13) "(5321) Jagras" }
        [8]=> array(3) {
          ["lang"]=> string(2) "pt"
          ["url"]=> string(40) "http://pt.wikipedia.org/wiki/5321_Jagras"
          ["*"]=> string(11) "5321 Jagras" }
        [9]=> array(3) {
          ["lang"]=> string(2) "uk"
          ["url"]=> string(64) "http://uk.wikipedia.org/wiki/5321_%D0%AF%D2%91%D1%80%D0%B0%D1%81"
          ["*"]=> string(15) "5321 Яґрас"
        }
}

{{ WikiRand::getPlainTextArticle() }}
// returns
5321 Jagras è un asteroide della fascia principale. Scoperto nel 1985, presenta un'orbita caratterizzata da un semiasse maggiore pari a 2,5810209 UA e da un'eccentricità di 0,2213576, inclinata di 13,58746° rispetto all'eclittica. Collegamenti esterni (EN) Jagras - Dati riportati nel database dell'IAU Minor Planet Center (EN) Jagras - Dati riportati nel Jet Propulsion Laboratory - Small-Body Database

{{ WikiRand::getArticleImages() }}
// returns
array(2) {
      [0]=> string(63) "http://upload.wikimedia.org/wikipedia/commons/8/83/Celestia.png"
      [1]=> string(76) "http://upload.wikimedia.org/wikipedia/commons/9/9a/Galileo_Gaspra_Mosaic.jpg"
}
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

You can run the tests with:

```
vendor/bin/phpunit run
```

Alternatively, you can run the tests like so:

```
composer test
```

Inspiration
-----------

[](#inspiration)

- [WikiRandom](https://github.com/ihoru/WikiRandom)

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

How can I thank you?
--------------------

[](#how-can-i-thank-you)

Why not star the github repo? I'd love the attention! Why not share the link for this repository on Twitter or HackerNews? Spread the word!

Don't forget to [follow me on twitter](https://twitter.com/unicodeveloper)!

Thanks! Prosper Otemuyiwa.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Security
--------

[](#security)

If you discover any security related issues, please email [prosperotemuyiwa@gmail.com](prosperotemuyiwa@gmail.com) instead of using the issue tracker.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

3895d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ae318eb1f5f21579ddee07834130c1169ae6a0771044c3de671dfb02cd79c59f?d=identicon)[unicodeveloper](/maintainers/unicodeveloper)

---

Top Contributors

[![unicodeveloper](https://avatars.githubusercontent.com/u/2946769?v=4)](https://github.com/unicodeveloper "unicodeveloper (19 commits)")

---

Tags

phplaravelunicodeveloperwikipedialaravel-wikipedia

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[amranidev/laracombee

Recommendation system for laravel

11538.8k1](/packages/amranidev-laracombee)[yieldstudio/tailwind-merge-php

Merge Tailwind CSS classes without style conflicts

4975.4k1](/packages/yieldstudio-tailwind-merge-php)[wujunze/money-wrapper

MoneyPHP Wrapper

103.8k](/packages/wujunze-money-wrapper)

PHPackages © 2026

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