@gych your answer is nice i will try it but what i ment is that the new way of registering routes is in bootstrap/app.php and i couldn't register my routes i have routes for web and routes for admin
this is my bootstrap/app.php
Application::configure(basePath: dirname(DIR))
->withRouting(
web: DIR.'/../routes/web.php',
commands: DIR.'/../routes/console.php',
health: '/up',
)
->withMiddleware(function (Middleware $middleware) {
$middleware->alias([
'maintenance_mode' => MaintenanceModeMiddleware::class,
'isMobile' => EnsureIsMobileMiddleware::class,
]);
})
->withExceptions(function (Exceptions $exceptions) {
//
})->create();
how to register web routes and admin routes
and this is just an example of my admin routes in a separate file. ignore the closing brackets
Route::group(['namespace' => 'Admin', 'prefix' => 'admin', 'as' => 'admin.'], function () {
Route::get('/', function () {
return redirect()->route('admin.auth.login');
});
/*authentication*/
Route::group(['namespace' => 'Auth', 'prefix' => 'auth', 'as' => 'auth.'], function () {
Route::get('/code/captcha/{tmp}', 'LoginController@captcha')->name('default-captcha');
Route::get('login', 'LoginController@login')->name('login');
Route::post('login', 'LoginController@submit')->middleware('actch');
Route::get('logout', 'LoginController@logout')->name('logout');
});