0

I have created some routes in Laravel using Route::methods and also resources but some admin and non-admin routes add extra 'admin' prefix in routes.

So when I am calling the routes it does not work without adding an extra prefix like "admin/admin/profile"

My some findings

  1. I have already checked any double prefix is not added in the routes.
  2. And Also check with php artisan route: list. It would show the correct route list without any extra prefixes.

1 Answer 1

0

Answer

Check below thing i think this will help you.

  1. I think you have a middleware group that is applying the prefix to all routes.
  2. You have a route group that is applying the prefix to all routes inside of it.
  3. or a custom route generator that is adding the prefix to all routes.

-> If you still having problem then you can check your all rout list by below command

php artisan route:list

-> Or you can use to check uri by current()->uri() function to get current URI

-> I hope this is help you.

Sign up to request clarification or add additional context in comments.

1 Comment

I have changed the uri admin to myadmin that is working properly without any extra prefix

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.