https://github.com/kirschbaum-development/mutable-listeners
https://github.com/kirschbaum-development/mutable-listeners
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/kirschbaum-development/mutable-listeners
- Owner: kirschbaum-development
- License: mit
- Created: 2020-10-31T00:56:24.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-16T01:30:11.000Z (over 2 years ago)
- Last Synced: 2024-01-17T07:14:12.559Z (over 2 years ago)
- Language: PHP
- Size: 71.3 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Laravel Mutable Listeners
A package for unregistering Listeners from Events in Laravel!
## Installation
You can install this package via composer:
```bash
composer require kirschbaum-development/mutable-listeners
```
## Usage
`Halloween` is full of `Tricks` and `Treats`:
```
class EventServiceProvider extends ServiceProvider
{
protected $listen = [
Halloween::class => [
Tricks::class,
Treats::class,
]
];
}
```
What if you could could get all the chocolatery without any of the chicanery?
### Event Facade
```php
Event::mute(Halloween::class, Tricks::class);
```
### Mutable Trait
A trait can also be added to a `Listener` for simplified muting:
```php
use KirschbaumDevelopment\MutableListeners\Mutable;
class Tricks
{
use Mutable;
// ...
}
Tricks::mute(Halloween::class);
```
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
### Security
If you discover any security related issues, please email justin@kirschbaumdevelopment.com or nathan@kirschbaumdevelopment.com instead of using the issue tracker.
## Credits
- [Justin Seliga](https://github.com/jrseliga)
- [Bogdan Cismariu](https://github.com/bcismariu)
## Sponsorship
Development of this package is sponsored by Kirschbaum Development Group, a developer driven company focused on problem solving, team building, and community. Learn more [about us](https://kirschbaumdevelopment.com/team) or [join us](https://careers.kirschbaumdevelopment.com/careers)!
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.