'cp', 'middleware' => 'web'], function () { Route::get('/', function (\Illuminate\Http\Request $request) { if (!Auth::check()) { return redirect()->route('login'); } else { return redirect()->route('dashboard'); } }); Route::get('auth/',[\App\Http\Controllers\SmartController::class, 'index'])->name('login'); }); // 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'); Route::get('caller/', [\App\Http\Controllers\SmartController::class, 'caller'])->name('caller'); Route::get('caller/logs', [\App\Http\Controllers\SmartController::class, 'caller_log'])->name('caller_log'); // Post Request for Internal Handling Route::post('caller/add', [\App\Http\Controllers\PostHandler::class, 'caller_add'])->name('caller_add'); });