Reputation: 71
I am trying to log Auth activity using Laravel 5.2 built-in Logs API.
The code would be like
\Log::info("Message here");
It works inside HomeController. However, it does not work inside AuthController.
Sample code inside logout method:
public function getLogout()
{
\Log::info('User has logged out.', ['email' => \Auth::user()->email]);
\Auth::logout();
return redirect('/');
}
Upvotes: 0
Views: 59
Reputation: 50491
If you are using Route::auth()
to register your Auth related routes, it does not use that method, getLogout
. It uses logout
.
Check your routes with php artisan route:list
to see what controller methods those Auth routes are using.
Upvotes: 1