'cp', 'middleware' => 'web'], function () { Route::get('/', function (\Illuminate\Http\Request $request) { if (!Auth::check()) { return redirect()->route('auth'); } else { return redirect()->route('internal'); } }); Route::get('auth/',[\App\Http\Controllers\SmartController::class, 'index'])->name('auth'); }); // Calls for Controllers Route::Group(['prefix' => 'call', 'middleware' => 'web'], function () { Route::post('login', [\App\Http\Controllers\AuthController::class, 'authenticate'])->name('post_login'); }); // Internal Area when do you have permissions and logged in Route::Group(['prefix' => 'internal', 'middleware' => 'auth'], function () { Route::get('dashboard/', [\App\Http\Controllers\SmartController::class, 'dashboard'])->name('dashboard'); });