'cp', 'middleware' => 'web'], function () { Route::get('/', function (\Illuminate\Http\Request $request) { if (!Auth::check()) { return redirect()->route('auth'); } else { return redirect()->route('dashboard'); } }); Route::get('auth/',[\App\Http\Controllers\SmartController::class, 'index'])->name('auth'); });