Hi, I have a problem with Login routing with the php artisan make: auth method that generates everything you need From now on it's quite difficult for me to join the project I was doing to this login and its views. But it does not let me change the prefedinida route to one that I want
So they come by default:
Route::get('login', 'Auth\LoginController@showLoginForm')->name('login');
Route::post('login', 'Auth\LoginController@login');
Route::post('logout', 'Auth\LoginController@logout');
Thus I customize
Route::get('admin/auth/login', 'Auth\LoginController@showLoginForm')->name('login');
Route::post('admin/auth/login', 'Auth\LoginController@login');
Route::post('admin/auth/logout', 'Auth\LoginController@logout');
LoginController.php
use AuthenticatesUsers;
protected $redirectTo = '/';
public function __construct()
{
$this->middleware('guest', ['except' => 'logout']);
}
public function showLoginForm()
{
return view('admin.auth.login'); //tambien cambie de dir la carp auth
}
public function logout(Request $request)
{
$this->guard()->logout();
$request->session()->flush();
$request->session()->regenerate();
//return view('inicio');
return redirect('/');
}
When I enter the login route, and log in I miss this error:
NotFoundHttpException in RouteCollection.php line 161: ...