0

I am working on laravel7 Project, I want to change default Auth::route() route paths

I have login page and I want to change it to something like: /random/random2/random3/login

but laravel auth comes with "/login". how can I edit it?

1
  • You could just define them yourself instead of using Auth::route(). Commented Sep 1, 2020 at 17:09

1 Answer 1

3

If you just want to prefix them, you can wrap it in a route group:

Route::prefix('random/random2/random3/')->group(function(){ Auth::routes(); }). 

I haven't tested this but it should work because Laravel references the routes by their name (e.g. route('login')) which would stay the same.

Alternatively you could just define your own routes instead of using Auth::routes() at all. You can copy the routes from the laravel/ui package and adjust them as needed.

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.