Search code examples
laraveleloquentlaravel-8laravel-jetstreamlaravel-10

changing the default url of route in laravel


I'm using jetstream in my laravel project and if the routes are exists by default , i want to change the url of login route, as we know the login route returns us to login view but i need to change this route to index route , i want to return the view login when user goes to the index route not to login route. as u know when you are using jetstream there arent the auth folder in controllers that have all routes to change it

i tried to do this route in web file

Route::get('/', function () { return view('auth.login'); }); it takes me to login page when the route is index but now there are 2 routes that take me to the same page and i dont need the second route /login or i need only to change the first from /login to /index


Solution

  • You can publish jetstream files and override routes and etc.