geowrgetudor / transaction-rollback
Track DB transaction rollbacks
Fund package maintenance!
George Tudor
Requires
- php: ^8.1|^8.2|^8.3
- illuminate/contracts: ^10.0|^11.0
- laravel/pulse: ^1.0@beta
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.8|^8.0
- orchestra/testbench: ^8.8|^9.0
- pestphp/pest: ^2.20
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
This package is auto-updated.
Last update: 2024-11-30 00:03:47 UTC
README
Track Laravel database transaction rollbacks
Track the rollbacked database transaction in Laravel Pulse.
Installation
You can install the package via composer:
composer require geowrgetudor/transaction-rollback
Optionally, you can publish the views using
php artisan vendor:publish --tag="transaction-rollback-views"
Usage
Register the recorder inside config/pulse.php
. (If you don't have this file make sure you have published the config file of Laravel Pulse using php artisan vendor:publish --tag=pulse-config
)
return [
// ...
'recorders' => [
// Existing recorders...
\Geow\TransactionRollback\Recorders\TransactionRollbackRecorder::class => [
'enabled' => env('GEOW_TRANSACTION_ROLLBACKS', true),
'ignore' => [
// Ignore connections or databases.
],
]
]
]
Rollbacked queries will be recorded ONLY if you use query logging DB::enableQueryLog()
before starting a transaction.
Publish Laravel Pulse dashboard.blade.php
view using php artisan vendor:publish --tag=pulse-dashboard
Then you can modify the file and add the transaction-rollbacks livewire template.
<livewire:transaction-rollbacks cols="full" />
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.