Artisan.page

make:listener

Create a new event listener class

Terminal
php artisan make:listener [-e|--event [EVENT]] [-f|--force] [--queued] [--test] [--pest] [--phpunit] [--] <name>

Options

eventOptional

The event class being listened for

forceOptional

Create the class even if the listener already exists

pestOptional

Generate an accompanying Pest test for the Listener

phpunitOptional

Generate an accompanying PHPUnit test for the Listener

queuedOptional

Indicates the event listener should be queued

testOptional

Generate an accompanying Test test for the Listener

Arguments

nameRequired

The name of the listener