skip to Main Content

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


  1. use ::prefix('admin')-> without the slash

    Login or Signup to reply.
  2. 1) ::prefix('admin') remove slash.

    2) run php artisan route:cache and it will work!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search