craigpotter / barstool
A Laravel package for logging Saloon Requests & Response.
Requires
- php: ^8.3|^8.4
- illuminate/contracts: ^10.0 | ^11.0 | ^12.0
- saloonphp/saloon: ^3.10.0
- spatie/laravel-package-tools: ^1.16.4
Requires (Dev)
- larastan/larastan: ^2.9.12 | ^v3.1.0
- laravel/pint: ^1.20.0
- nunomaduro/collision: ^7.10 | ^8.6.1
- orchestra/testbench: ^8.24 | ^9.9 | ^10.0
- pestphp/pest: ^2.35 | ^3.7.4
- pestphp/pest-plugin-arch: ^2.7 | ^3.0
- pestphp/pest-plugin-laravel: ^2.4 | ^3.1
- spatie/laravel-ray: ^1.39.0
This package is auto-updated.
Last update: 2025-02-24 18:39:10 UTC
README
Caution
This package is currently in development and using in production should be at your own risk. Breaking changes could still happen before a stable v1.0. Please check back soon for updates.
Bartool 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!
Installation
You can install the package via composer:
composer require craigpotter/barstool
You can publish and run the migrations with:
php artisan vendor:publish --tag="barstool-migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --tag="barstool-config"
Usage
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!
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
If you discover any security related issues, please email barstool@craigpotter.co.uk instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.