I installed and configured the inertia on my laravel app and wanted to create also an admin along with the already established single page functionality on my app and wanted to group it under /admin
Route::prefix('/admin')->group(function(){
Route::get('/login',[AdminController::class, 'login'])->name('admin.login');
});
the above route is expected to be accessible at "<domain>/admin/login"
but not working at all. Any help, suggestions, ideas is greatly appreciated.
2
Answers
use
::prefix('admin')->
without the slash1)
::prefix('admin')
remove slash.2) run
php artisan route:cache
and it will work!