Barstool is a dedicated Laravel package to help you keep track of your Saloon requests & responses.
Barstool will allow you to easily view, search, and filter your logs directly in your database tool of choice.
The package is designed to be as simple as possible to get up and running, with minimal configuration required.
So pull up a barstool, grab a drink, and let's get logging in the Saloon! Yeehaw!
You can install the package via composer:
composer require saloonphp/barstoolYou can publish and run the migrations with:
php artisan vendor:publish --tag="barstool-migrations"
php artisan migrateYou can publish the config file with:
php artisan vendor:publish --tag="barstool-config"You should also set up Laravel Model Pruning in your scheduler. Please check the Laravel Documentation for your version to know where to put the code below.
use Saloon\Barstool\Models\Barstool;
Schedule::command('model:prune', [
'--model' => [Barstool::class],
])->daily();That's all folks! Once installed, it will start logging your Saloon requests automatically. Check the config out for more control.
Here are some of the things you can see with Barstool:
- Request Method
- Connector Used
- Request Used
- Request URL
- Request Headers
- Request Body
- Response Status Code
- Response Headers
- Response Body
- Response Duration
The logging will even log fatal errors caused by your saloon requests so you can see what went wrong.
Tip
We will be adding more features soon, so keep an eye out for updates!
composer testPlease see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email barstool@craigpotter.co.uk instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.
