Skip to content

kirschbaum-development/mutable-listeners

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Mutable Listeners

A package for unregistering Listeners from Events in Laravel!

Installation

You can install this package via composer:

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

Event::mute(Halloween::class, Tricks::class);

Mutable Trait

A trait can also be added to a Listener for simplified muting:

use KirschbaumDevelopment\MutableListeners\Mutable;

class Tricks
{
    use Mutable;

    // ...
}

Tricks::mute(Halloween::class);

Contributing

Please see CONTRIBUTING for details.

Security

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

Credits

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 or join us!

License

The MIT License (MIT). Please see License File for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages