Learn how to get started with Treblle using our Laravel package in less than 2 minutes on any new or existing API
composer require treblle/treblle-laravel
You can ⭐ our Github repo to stay up to date with new updates
php artisan treblle:start
Get an API KEY and PROJECT ID without ever leaving your console
Route::middleware(['treblle'])->group(function () { // YOUR API ROUTES GO HERE Route::prefix('samples')->group(function () { Route::get('{uuid}', [SampleController::class, 'view']); Route::post('store', [SampleController::class, 'store']); });});
Add the treblle middleware on your API route group
You and your team just got these amazing features:
// Add this to your .env fileTREBLLE_IGNORED_ENV=local,dev,test
Define the Laravel environments you want Treblle to ignore
return [ // other config // Edit masked_fields array in config/treblle.php 'masked_fields' => [ 'password', 'pwd', 'secret', 'password_confirmation', 'cc', 'card_number', 'ccv', 'ssn', 'credit_score', 'api_key', ],];
PRO TIP: Data is masked before it even leaves your server