akaunting / laravel-mutable-observer
Mutable observer package for Laravel
Installs: 95 328
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 4
Forks: 3
Open Issues: 0
Requires
- php: ^8.0
- laravel/framework: ^9.0|^10.0
Requires (Dev)
- orchestra/testbench: ^7.4|^8.0
- phpunit/phpunit: ^9.5|^10.0
This package is auto-updated.
Last update: 2024-10-16 18:26:00 UTC
README
This package allows you to mute
and unmute
a specific observer at will. It ships with a trait that adds mutable methods to your observer.
Installation
Run the following command:
composer require akaunting/laravel-mutable-observer
Usage
All you have to do is use the Mutable
trait inside your observer.
namespace App\Observers; use Akaunting\MutableObserver\Traits\Mutable; class UserObserver { use Mutable; }
Now you can mute
and unmute
the observer as needed:
UserObserver::mute(); // Some logic, i.e. test UserObserver::unmute();
Changelog
Please see Releases for more information what has changed recently.
Contributing
Pull requests are more than welcome. You must follow the PSR coding standards.
Security
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see LICENSE for more information.