public function boot()
    {
        $this->app['events']->listen($this->failedEvent, function ($event) {
            if (isset($event->user) && is_a($event->user, 'Illuminate\Database\Eloquent\Model')) {
                $event->user->notify(new FailedLoginNotification(
                    $this->app['request']->ip()
                ));
            }
        });

        $this->app['events']->listen($this->successEvent, function ($event) {
            if (isset($event->user) && is_a($event->user, 'Illuminate\Database\Eloquent\Model')) {
                $event->user->notify(new SuccessfulLoginNotification(
                    $this->app['request']->ip()
                ));
            }
        });
    }