vendredi 1 mars 2019

laravel route prefix not redirect properly

What wrong with this code ?

Auth::routes();
Route::get('/',function (){
    return redirect('admin');
});
Route::get('login', ['as' => '/', 'uses' =>'Web\AuthController@showLoginPage']);
Route::get('register', ['as' => '/', 'uses'=>'Web\AuthController@showLoginPage']);
Route::prefix('admin')->group(function (){
    Route::get('/','Web\AuthController@showLoginPage');
});

When I try to hit http://localhost/restaurant/ it redirects me to http://localhost/restaurant/admin which is fine but the problem is on this url it says :

** Not Found The requested URL /restaurant/admin was not found on this server. **



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire