treblle / treblle-api-tools-laravel
A set of useful tools for building APIs in Laravel.
Installs: 3 149
Dependents: 2
Suggesters: 0
Security: 0
Stars: 12
Watchers: 3
Forks: 1
Open Issues: 0
Requires
- php: ^8.2
- juststeveking/http-helpers: ^0.0.2
Requires (Dev)
- laravel/pint: ^1.7
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.2.3
- phpstan/phpstan: ^1.10.8
README
Treblle makes it super easy to understand what’s going on with your APIs and the apps that use them. Just by adding Treblle to your API out of the box you get:
- Real-time API monitoring and logging
- Auto-generated API docs with OAS support
- API analytics
- Quality scoring
- One-click testing
- API management on the go
- Supports Laravel Vapor and Laravel Octane
- and more...
A set of useful tools for building APIs in Laravel.
Requirements
- PHP 8.2+
- Laravel 10+
Installation
composer require treblle/treblle-api-tools-laravel
Usage
Headers
Authorization
You can use the Authorization Header can be used like the following:
use Treblle\Tools\Http\Enums\Headers\AuthScheme; use Treblle\Tools\Http\Headers\Authorization; $auth = new Authorization( type: AuthScheme::BEARER, credentials: 'YOUR_API_TOKEN_HERE', ); // Turn the header into an array $array = $auth->toArray(); //[ // 'type' => AuthScheme::BEARER, // 'credentials' => 'YOUR_API_TOKEN_HERE' //] // Turn the header into a header $header = $auth->toHeader(); //[ // 'Authorization' => 'Bearer YOUR_API_TOKEN_HERE', //]
Support
If you have problems of any kind feel free to reach out via https://treblle.com or email hello@treblle.com, and we'll do our best to help you out.
License
Copyright 2022., Treblle Limited. Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php