diff --git a/src/Illuminate/Foundation/Console/ListenerMakeCommand.php b/src/Illuminate/Foundation/Console/ListenerMakeCommand.php index 6d815bbd7d31..6e549fd6d042 100644 --- a/src/Illuminate/Foundation/Console/ListenerMakeCommand.php +++ b/src/Illuminate/Foundation/Console/ListenerMakeCommand.php @@ -44,7 +44,7 @@ class ListenerMakeCommand extends GeneratorCommand */ protected function buildClass($name) { - $event = $this->option('event'); + $event = $this->option('event') ?? ''; if (! Str::startsWith($event, [ $this->laravel->getNamespace(),