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

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

unicodeveloper/laravel-medium
=============================

A Medium Bridge for Laravel 5

4132[1 issues](https://github.com/unicodeveloper/laravel-medium/issues)PHP

Since Nov 26Pushed 10y ago1 watchersCompare

[ Source](https://github.com/unicodeveloper/laravel-medium)[ Packagist](https://packagist.org/packages/unicodeveloper/laravel-medium)[ RSS](/packages/unicodeveloper-laravel-medium/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

laravel-medium
==============

[](#laravel-medium)

[![Latest Stable Version](https://camo.githubusercontent.com/f26518e6333339778f4c5bf2f5e662d52202f08ae32878b17d548f2afa2cebc2/68747470733a2f2f706f7365722e707567782e6f72672f756e69636f646576656c6f7065722f6c61726176656c2d6d656469756d2f762f737461626c652e737667)](https://packagist.org/packages/unicodeveloper/laravel-medium)[![License](https://camo.githubusercontent.com/ccfeb5cad4db554585bdf833cf7486a1eac12dd0cc8c5d8d41b9f1a651f40d77/68747470733a2f2f706f7365722e707567782e6f72672f756e69636f646576656c6f7065722f6c61726176656c2d6d656469756d2f6c6963656e73652e737667)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/3000e6721a5ccaea6b20a87386f9e4cfd19c17d2a3e6ba807b79c5509e505705/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f756e69636f646576656c6f7065722f6c61726176656c2d6d656469756d2e737667)](https://travis-ci.org/unicodeveloper/laravel-medium)[![Quality Score](https://camo.githubusercontent.com/0771ca9ca18a62dd6fa5185ba376d1a79f492ac7ba79f68b25eae354f1bf1748/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f756e69636f646576656c6f7065722f6c61726176656c2d6d656469756d2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/unicodeveloper/laravel-medium)[![Total Downloads](https://camo.githubusercontent.com/da1053f4a2cb9b3dc212143d050810350fa087e6838ae0ade3df48fe061aa74e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f756e69636f646576656c6f7065722f6c61726176656c2d6d656469756d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/unicodeveloper/laravel-medium)

> Laravel 5 Package to work with Medium. 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-medium
```

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

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

```

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

Add this to your providers array in `config/app.php`

```
// Laravel 5: config/app.php

'providers' => [
    ...
    Unicodeveloper\Medium\MediumServiceProvider::class,
    ...
];
```

This package also comes with a facade

```
// Laravel 5: config/app.php

'aliases' => [
    ...
    'Medium' => Unicodeveloper\Medium\Facades\Medium::class',
    ...
]
```

Publish the config file by running:

```
php artisan vendor:publish
```

The config file will now be located at `config/medium.php`.

Configuration
-------------

[](#configuration)

This is the `medium.php` file in the `config` directory. Go to your [medium settings page](https://medium.com/me/settings), and generate an access token also known as integration token. Integration tokens do not expire right now, though they may be revoked by the user at any time.

```
/**
 *  Config file that a user/developer can insert the self-issued access token
 */
return [
    'integrationToken' => ''
];
```

Usage
-----

[](#usage)

##### MediumManager

[](#mediummanager)

This is the class of most interest. It is bound to the ioc container as `'laravel-medium'` and can be accessed using the `Facades\Medium` facade.

##### Facades\\Medium

[](#facadesmedium)

This facade will dynamically pass static method calls to the `'laravel-medium'` object in the ioc container which by default is the `MediumManager` class.

##### Examples

[](#examples)

Here you can see an example of just how simple this package is to use.

```
use Unicodeveloper\Medium\Facades\Medium;
// or you can alias this in config/app.php like I mentioned initially above

Medium::me()->id;
// returns the id of the medium user that can be used for future requests e.g 13889cdb2bb57e75ab7d7261f1f0c4df0e824b3f2249f55b788c0dc2ae84c6b8f

Medium::me()->username;
// returns the username of the medium user e.g prosper

Medium::me()->name;
// returns the full name of the medium user e.g Testing Tester

Medium::me()->url;
// returns the url of the medium profile e.g  "https://medium.com/@prosper"

Medium::me()->imageUrl;
// returns the url of the medium user avatar
```

WIP - PLEASE DON'T USE IN PRODUCTION YET!
=========================================

[](#wip---please-dont-use-in-production-yet)

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
```

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

[](#contributing)

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

Credits
-------

[](#credits)

- [Prosper Otemuyiwa](https://twitter.com/unicodeveloper)

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

21

—

LowBetter than 18% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

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.

### 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 (13 commits)")

### Embed Badge

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

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

###  Alternatives

[javiereguiluz/easyslugger

A fast and easy to use slugger with full UTF-8 support.

791.0M5](/packages/javiereguiluz-easyslugger)[krak/fn

Functional library for php with proper currying

2419.0k3](/packages/krak-fn)[varunsridharan/wp-dependencies

Provides Function To Check if a plugin is active/inactive &amp; function to compare versions.

1032.5k1](/packages/varunsridharan-wp-dependencies)

PHPackages © 2026

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