mardi 28 mai 2019

Log::info - Logging user logout in laravel.log

I want add all activities inside my app in the larave.log file. I was able to add user login inside it but not the logout.

I do that using Laravel 5.8 with a mysql 5 database.

This is code inside HomeController for registering login user loading home view.

public function index()
{
    Log::info('Utente collegato: '.Auth::user()->name);
    return view( config('configpath.user_home') );// loading user homepage
}

The code below is inside Laravel default LoginController

public function userLogout()
{
    Log::info('User '.Auth::user()->name. 'has logged out');
    Auth::guard('web')->logout();
    return redirect()->route('login');
}

With logout I expect to see the message about user logout as in login but I don't see it. Someone can give me an explanation? Thanks!



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2HHKlmd
via IFTTT

Aucun commentaire:

Enregistrer un commentaire