Laravel Toconline API
- 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/oauthuse Mupy\TOConline\Facades\TOConline;
try {
$docs = TOConline::api()->documents();
} catch (\Throwable $th) {
// Handle exceptions as needed
}