kly / laravel-onesdk
Laravel service provide for onesdk app php SDK
Installs: 11 326
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 2
Open Issues: 1
Requires
- illuminate/support: ^5.5
- kly/onesdk: ^2.0
Requires (Dev)
- laravel/laravel: ^5.5
- orchestra/testbench: ~3.0
- phpunit/phpunit: ^6.0|^7.0
- symplify/easy-coding-standard: ^4.5
This package is not auto-updated.
Last update: 2024-11-16 14:16:51 UTC
README
One APP SDK to laravel binding service provider
Prerequisite
- Laravel >= 5.5
Installation
If you are using composer you could get it with composer require kly/laravel-onesdk
and you are all set. Load up the autoloader and Call the classes or factory you need.
Register the Service Provider
Add the Service Provider to your application's config/app.php file. Must be added to the providers array.
'providers' => [
One\Provider\OneSdkServiceProvider::class
]
Publish the Package configuration
This will publish the configuration file to your app's config directory. The location will be config/one.php. Specify your API settings there.
<?php
return [
'client-id' => 0,
'client-secret' => 'some-secret-string-token',
'access_token' => ''
];
php artisan vendor:publish
Usage
use Config;
use One\FactoryUri;
use One\Publisher;
new Publisher( Config::get('one.client_id'), Config::get('one.client_secret') );
new FactoryUri('https://username:password@www.example.com:85/kerap/254?page=1#idkomentar');