Notflip Notflip - 10 days ago 5
PHP Question

Laravel event:generate only creates Event and returns error

I'm using Laravel 5.3, I'm following the example here
https://laravel.com/docs/master/events#registering-events-and-listeners

I create the following in my EventServiceProvider

protected $listen = [
'App\Events\UserWasRegistered' => [
'App\Listeners\AddRoleForRegisteredUser',
],
];


When I then run

php artisan event:generate


It's only generating the event and throwing the following error


[Symfony\Component\Console\Exception\LogicException]
An option with shortcut "q" already exists.


Any idea what I might be doing wrong?
Thank you!

Answer

That's a Laravel bug, already fixed. Simply run composer update to update the Laravel framework and all should be ok.

Comments