mercredi 15 janvier 2020

EventServiceProvider not working properly after update to laravel 5.5

Upgraded my project from laravel 5.1 to 5.5 It took a lot of work but mostly all issues are solved. What I couldn't find any info in the internet is about a middleware listener, in the previous laravel version it worked fine, now it doesn't

class EventServiceProvider extends ServiceProvider {

/**
 * The event handler mappings for the application.
 *
 * @var array
 */
protected $listen = [
    'auth.login' => [
        LoginListener::class,
    ],
];

/**
 * Register any other events for your application.
 *
 * @param  \Illuminate\Contracts\Events\Dispatcher  $events
 * @return void
 */
public function boot()
{
    parent::boot();
}

and LoginListener class

class LoginListener {
    /**
     * @param \App\Models\User $user
     * @param $remember
     */
    public function handle($user, $remember) {
        die("Never comes here");
        $user->last_login = Carbon::now();


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2QYoPOJ
via IFTTT

Aucun commentaire:

Enregistrer un commentaire