How to redirect a route prefix to another route in laravel? – Apache
I am using laravel 5.7. Please see my code: web.php Route::prefix('admin')->group(function () { Route::get('/', function () { return redirect()->route('admin.check'); }); Route::get('/check-auth', 'AdminAdminController@checkAuth')->name('admin.check'); }); AdminController::checkAuth() public function checkAuth() { if(true == Auth::guard('admin')->user()){ return redirect()->route('cs.dashboard'); } else{ return redirect()->route('admin.login'); } } I…