PHPackages                             saloonphp/barstool - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. saloonphp/barstool

ActiveLibrary[HTTP &amp; Networking](/categories/http)

saloonphp/barstool
==================

A Laravel package for logging Saloon Requests &amp; Response.

v1.1.1(1mo ago)1725.8k↑12050%3[1 issues](https://github.com/saloonphp/barstool/issues)[1 PRs](https://github.com/saloonphp/barstool/pulls)1MITPHPPHP ^8.3|^8.4CI passing

Since Mar 26Pushed 1mo agoCompare

[ Source](https://github.com/saloonphp/barstool)[ Packagist](https://packagist.org/packages/saloonphp/barstool)[ Docs](https://github.com/saloonphp/barstool)[ RSS](/packages/saloonphp-barstool/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (3)Dependencies (28)Versions (7)Used By (1)

Barstool
========

[](#barstool)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ffb0e6c4cf24425ccb1adda416e751b76ae47a2413ae8e1983c3d5bea8b95361/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73616c6f6f6e7068702f62617273746f6f6c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/saloonphp/barstool)[![GitHub Tests Action Status](https://camo.githubusercontent.com/0824755a4abce3ed3d4456632799bfcb985a8ee5d66502adfcbd82f84fbe1d1d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f73616c6f6f6e7068702f62617273746f6f6c2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/saloonphp/barstool/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/3b461a425e2f020f1bf57d47596b8fa844961e79ab26b9e2ce301725dbbb9e75/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f73616c6f6f6e7068702f62617273746f6f6c2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/saloonphp/barstool/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/51fdb02fae4cd9e717d70726d80b0d97058bd9d6402011e86f73fb54e3a6ec32/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73616c6f6f6e7068702f62617273746f6f6c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/saloonphp/barstool)

Barstool is a dedicated Laravel package to help you keep track of your [Saloon](https://github.com/saloonphp/saloon) requests &amp; 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
------------

[](#installation)

You can install the package via composer:

```
composer require saloonphp/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"
```

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();
```

Usage
-----

[](#usage)

That's all folks! Once installed, it will start logging your [Saloon](https://github.com/saloonphp/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.

[![Screenshot of the fatal error logged in the database](/art/fatal_error.png)](/art/fatal_error.png)

Tip

We will be adding more features soon, so keep an eye out for updates!

Queue Support
-------------

[](#queue-support)

By default, Barstool writes recordings to the database synchronously. If you'd like to offload this to a queue, you can enable it in the config:

```
// config/barstool.php
'queue' => [
    'enabled' => env('BARSTOOL_QUEUE_ENABLED', false),
    'connection' => env('BARSTOOL_QUEUE_CONNECTION'),  // null uses default connection
    'queue' => env('BARSTOOL_QUEUE_NAME'),             // null uses default queue
],
```

Or simply set `BARSTOOL_QUEUE_ENABLED=true` in your `.env` file.

When queue support is enabled, recordings are dispatched as jobs instead of being written inline. Each job is **unique** (preventing duplicates) and uses **idempotent writes** (`updateOrCreate`), so recordings are safe even if a job is retried. Failed jobs will automatically retry up to 3 times with a backoff of 5 and 30 seconds.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](./.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Craig Potter](https://github.com/craigpotter)
- [Sam Carre](https://github.com/Sammyjo20)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

53

—

FairBetter than 96% of packages

Maintenance87

Actively maintained with recent releases

Popularity39

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~16 days

Total

3

Last Release

59d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/de41c8bfde9d0edb25da9fdc159283fe9442e3dc9b651ee9aa7ded8384e5629d?d=identicon)[SamCarre](/maintainers/SamCarre)

---

Top Contributors

[![craigpotter](https://avatars.githubusercontent.com/u/1442635?v=4)](https://github.com/craigpotter "craigpotter (6 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![lloricode](https://avatars.githubusercontent.com/u/8251344?v=4)](https://github.com/lloricode "lloricode (1 commits)")[![niladam](https://avatars.githubusercontent.com/u/4151765?v=4)](https://github.com/niladam "niladam (1 commits)")

---

Tags

httplaravelloggingsaloonsaloonphpbarstool

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/saloonphp-barstool/health.svg)

```
[![Health](https://phpackages.com/badges/saloonphp-barstool/health.svg)](https://phpackages.com/packages/saloonphp-barstool)
```

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.3M42](/packages/spatie-laravel-pdf)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3913.7k](/packages/rawilk-profile-filament-plugin)[sunchayn/nimbus

A Laravel package providing an in-browser API client with automatic schema generation, live validation, and built-in authentication with a touch of Laravel-tailored magic for effortless API testing.

32837.0k](/packages/sunchayn-nimbus)[dragon-code/laravel-http-logger

Logging incoming HTTP requests

319.8k3](/packages/dragon-code-laravel-http-logger)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
