I set my login path to be 123. Here's how I did it:
In routes/web.php
, I posted this:
// Authentication Routes...
Route::get('123', 'Auth\LoginController@showLoginForm')->name('login');
Route::post('123', 'Auth\LoginController@login');
Route::post('logout', 'Auth\LoginController@logout')->name('logout');
// Registration Routes...
Route::get('register', 'Auth\RegisterController@showRegistrationForm')->name('register');
Route::post('register', 'Auth\RegisterController@register');
// Password Reset Routes...
Route::get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name('password.request');
Route::post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name('password.email');
Route::get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name('password.reset');
Route::post('password/reset', 'Auth\ResetPasswordController@reset');
I deleted the default Auth::routes();
line in the same file.
Like it should, localhost:8000/login
generates this error:
NotFoundHttpException in RouteCollection.php line 161:
But, when I type localhost:8000/123
, I get:
ReflectionException in RouteSignatureParameters.php line 39:
Method App\Http\Controllers\HomeController::index() does not exist
after getting redirected to localhost:8000/home
.
So there is some sort of weird redirect going on here. /home doesn't exist, so probably that is the direct reason for the error. But why does it redirect at all? It should go to the login page!
Help please.
via Sandi