I am new in Laravel and using Laravel 5.6. I want to edit that where the user will be redirected after logout. So I checked the web.php file and then by going in CMD I typed php artisan route:list all routes came up, there is a POST method of logout and its controller is App\Http\Controllers\Auth\LoginController@logout so I checked the LoginController there is nothing except following code, where is the logout method???
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
class LoginController extends Controller
{
/*
|--------------------------------------------------------------------------
| Login Controller
|--------------------------------------------------------------------------
|
| This controller handles authenticating users for the application and
| redirecting them to your home screen. The controller uses a trait
| to conveniently provide its functionality to your applications.
|
*/
use AuthenticatesUsers;
/**
* Where to redirect users after login.
*
* @var string
*/
protected $redirectTo = '/home';
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest')->except('logout');
}
}
I have also searched, what I found is to change the $redirectTo variable's value but it's not woking because it's the URL after login.