jonathantorres / laravel-medium-sdk
Laravel Service Provider for Medium's SDK for PHP.
Installs: 3 846
Dependents: 0
Suggesters: 0
Security: 0
Stars: 21
Watchers: 4
Forks: 4
Open Issues: 0
Requires
- php: ^8.0
- illuminate/support: ^9.0
- jonathantorres/medium-sdk: ^0.5.0
Requires (Dev)
- orchestra/testbench: ^7.0
- phpunit/phpunit: ^9.5.10
README
Laravel Service Provider for Medium's SDK for PHP. Version 9.x
of the framework is currently supported. Documentation for the SDK can be found here.
Installation via Composer
$ composer require jonathantorres/laravel-medium-sdk
Register the Service Provider
Add the Service Provider to your application's config/app.php
file. Must be added to the providers
array.
'providers' => [ JonathanTorres\LaravelMediumSdk\LaravelMediumSdkServiceProvider::class, ]
Publish configuration file
This will publish the configuration file to your app's config
directory. The location will be config/laravel-medium-sdk.php
. Specify your API settings there.
php artisan vendor:publish
Resolve from Laravel's service container
Now just resolve the JonathanTorres\LaravelMediumSdk\LaravelMediumSdk
class from Laravel's service container and start making requests to Medium's API using your credentials. More details on every method for the SDK can be found here.
// using the App facade $medium = App::make(JonathanTorres\LaravelMediumSdk\LaravelMediumSdk::class); // resolving from a controller method public function index(JonathanTorres\LaravelMediumSdk\LaravelMediumSdk $medium) { // use $medium here }
Running tests
$ composer test
License
This library is licensed under the MIT license. Please see LICENSE for more details.
Changelog
Please see CHANGELOG for more details.
Contributing
Please see CONTRIBUTING for more details.