-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a way of customizing/disabling the default routes #67
Conversation
Now that we can see the changes, I much prefer this solution to my own. |
Do you have a really good reason to do this? I'm trying to understand if this would ever actually be useful. |
My use-case for this is to have more control over the path each route uses (for my application, I wanted to leave the |
Hi @taylorotwell , Now that this PR was accepted, can you reconsider the similar PR for Fortify? PR laravel/fortify#13 by @MarkIvanowich It basically does the same as this one. For some projects I work on, customizing the authentication routes is a requirement. Specially when migrating old ones that already use custom routes and have some integration in place with other systems. Thank you very much. |
Hi, can I ask how can i use this feature? How should I override the value of should I just say |
You just need to run |
okay, so I guess after that I should be able to insert this code to my
making the jetstream route file working... |
I had to move |
], function () { | ||
$this->loadRoutesFrom(__DIR__.'/../routes/'.config('jetstream.stack').'.php'); | ||
}); | ||
if (Jetstream::$registersRoutes) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@m1guelpf Could you add a matching method to the Jetstream class and call that here, instead of directly accessing the class property? It would keep the code consistent with the patterns used across this package
This is a great option to have. I recently wanted to change the Team(s) vocabulary to Project(s) and this worked perfectly. I've written up the steps I followed to make the change in a blog post in case it's useful for others |
@m1guelpf this doesn't let you customize the routes or disable only some of them, right? All or nothing? |
@mokhosh You can change whatever you want. Look at the routes file which is published https://github.com/laravel/jetstream/blob/2.x/routes/inertia.php Once you've completed the necessary steps, you'll have a copy of this (or the Livewire equivalent) file in your project and can edit it however you see fit |
This PR introduces a way of disabling registration of the default routes like other Laravel packages already allow (Cashier, for example). It also adds an option to publish the routes for the adapter you're currently using to your routes folder.
Resubmission of #54