title: Laravel Artisan event:generate command throwing a Fatal error
body: <p>I'm following the official documentation for Laravel 5.7 on the events registration and generation: <a href="https://laravel.com/docs/5.7/events#generating-events-and-listeners" rel="nofollow noreferrer">https://laravel.com/docs/5.7/events#generating-events-and-listeners</a></p>
  <p>I have an <code>EventServiceProvider</code> with the following events defined:</p>
  <pre><code>&lt;?php
  
  namespace App\Providers;
  
  use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
  
  class EventServiceProvider extends ServiceProvider
  {
  
      /**
       * The event handler mappings for the application.
       *
       * @var array
       */
      protected $listen = [
          'App\Events\FormBeforeCreate' =&gt; [
              'App\Listeners\WebhookBeforeCreate',
          ],
          'App\Events\FormAfterCreate' =&gt; [
              'App\Listeners\NotifyAfterCreate',
              'App\Listeners\WebhookAfterCreate',
          ],
          'App\Events\FormBeforeUpdate' =&gt; [
              'App\Listeners\WebhookBeforeUpdate',
          ],
          'App\Events\FormAfterUpdate' =&gt; [
              'App\Listeners\NotifyAfterUpdate',
              'App\Listeners\WebhookAfterUpdate',
          ],
          'App\Events\FormBeforeDelete' =&gt; [
              'App\Listeners\WebhookBeforeDelete',
          ],
          'App\Events\FormAfterDelete' =&gt; [
              'App\Listeners\NotifyAfterDelete',
              'App\Listeners\WebhookAfterDelete',
          ],
          'App\Events\FormBeforeSave' =&gt; [
              'App\Listeners\WebhookBeforeSave',
          ],
          'App\Events\FormAfterSave' =&gt; [
              'App\Listeners\NotifyAfterSave',
              'App\Listeners\WebhookAfterSave',
          ],
      ];
  
      /**
       * The subscriber classes to register.
       *
       * @var array
       */
      protected $subscribe = [
          'App\Listeners\UserEventSubscriber',
      ];
  
      /**
       * Register any other events for your application.
       *
       * @return void
       */
      public function boot()
      {
          parent::boot();
      }
  }
  </code></pre>
  <h1><strong>The error:</strong></h1>
  <p>When I run the command <code>php artisan event:generate</code> I get the following error:</p>
  <pre><code>PHP Fatal error:  Call to a member function listens() on null in /app/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventGenerateCommand.php on line 35
  
                                                             
    [Symfony\Component\Debug\Exception\FatalErrorException]  
    Call to a member function listens() on null
  </code></pre>
  <p>According to the doc, it should do this:</p>
  <blockquote>
  <p>This command will generate any events or listeners that are listed in
  your EventServiceProvider. Events and listeners that already exist
  will be left untouched</p>
  </blockquote>
  <p>I don't understant what I've missed since I didn't find any similar error by searching the web</p>