title: Event listener in laravel 5.4
body: <p>I am using laravel 5.4 for creating my project and i used auth controller for login and register what I need is to get the last login time of user and store it in database when i referred that i came about an idea of creating event listeners and i done it..</p>
  
  <p><a href="https://stackoverflow.com/questions/28970105/login-event-handling-in-laravel-5">login event handling in laravel 5</a></p>
  
  <p>This is  in my</p>
  
  <blockquote>
    <p>EventServiceProvider.php</p>
  </blockquote>
  
  <pre><code>   &lt;?php
  
      namespace App\Providers;
  
      use Illuminate\Support\Facades\Event;
      use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
  
      class EventServiceProvider extends ServiceProvider
      {
          /**
           * The event listener mappings for the application.
           *
           * @var array
           */
          protected $listen = [
              'App\Events\SomeEvent' =&gt; [
                  'App\Listeners\EventListener',
              ],
               'Illuminate\Auth\Events\Login' =&gt; [
                  'App\Listeners\AuthLoginListener',
              ],
          ];
  
          /**
           * Register any events for your application.
           *
           * @return void
           */
          public function boot()
          {
              parent::boot();
  
  
          }
      }
  I defined listener as AuthLoginListner and my 
  
  &gt; AuthLoginListner.php
  
  &lt;?php
  
  namespace App\Listeners;
  use Carbon\Carbon;
  use Illuminate\Queue\InteractsWithQueue;
  use Illuminate\Contracts\Queue\ShouldQueue;
  use App\User;
  use Illuminate\Auth\Events\Login;
  class AuthLoginListener
  {
      /**
       * Create the event listener.
       *
       * @return void
       */
      public function __construct()
      {
          //
      }
  
      /**
       * Handle the event.
       *
       * @param  auth.login  $event
       * @return void
       */
      public function handle(Login $event)
      {
          return "yes";
      }
  }
  </code></pre>
  
  <p>Here i just return one text now what my doubt is how its working and where i get this yes message it doesnot show me any error now have an doubt its working correcty or not if yes where i get this message ..please any one help me out i just confused with this ...</p>