peter9x / laravel-toconline-api
Laravel package for toconline API
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/peter9x/laravel-toconline-api
Requires
- ext-curl: *
- ext-fileinfo: *
- ext-json: *
- guzzlehttp/guzzle: 7.x
- illuminate/support: ^10.0|^11.0|^12.0
- league/oauth2-client: ^2
Requires (Dev)
- laravel/pint: ^1.24
- orchestra/testbench: ^10.4
- pestphp/pest: ^v2.34|^3.7
- phpunit/phpunit: ^11.5
README
laravel-toconline-api
Laravel Toconline API
Installation
- Install the package via Composer:
composer require peter9x/laravel-toconline-api
- Publish the configuration file:
php artisan vendor:publish --provider="Mupy\\TOConline\\TOConlineServiceProvider" --tag=config
- Add the following to your
.envfile:
TOC_CLIENT_ID=your-client-id TOC_CLIENT_SECRET=your-client-secret TOC_URI_OAUTH=https://example.com/callback
- Optional config to add on the
.envfile:
TOC_BASE_URL=https://example.com TOC_BASE_URL_OAUTH=https://example.com/oauth
Usage
use Mupy\TOConline\Facades\TOConline; try { $docs = TOConline::api()->documents(); } catch (\Throwable $th) { // Handle exceptions as needed }