-
Notifications
You must be signed in to change notification settings - Fork 825
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
[1.x] Use named routes on Inertia with Ziggy #314
Conversation
Think we'll need to target 2.x here since ziggy is now basically required and existing installs won't have the dependency. |
@m1guelpf I don't think it matters since this only really affects the installation process and stubs. Existing apps won't have it but new apps will. |
@taylorotwell correct, didn't saw that only the stubs were updated 👍 |
@m1guelpf after merging this and testing locally I get 419 CSRF problems on every POST. Yeah, confirmed twice. I use most recently tagged laravel//jetstream + Inertia and everything is fine. I use Jetstream edge after this PR is merged and I get CSRF problems on POST (for example password confirmation or even logout). |
I don't get how this should affect anything, the result should be exactly the same |
@m1guelpf you don't have this problem? |
I didn't, but I also didn't fully test all endpoints (just made sure no pages throwed errors and tried a few), so it's possible I didn't trigger any POST ones. The interesting thing is, if you |
So you are able to reproduce what I'm talking about now? |
Description
This PR replaces all URLs on the Inertia skeleton with named routes, making use of the Ziggy package from Tighten.
Related Issues
Closes #157
Future Improvements
I wasn't able to replace the URLs on the two-factor authentication component since their routes aren't named. If requested, I could submit a PR to fortify that adds names for these routes for completion's sake.