Ziggy route filtering for Inertia app(react, laravel) #647
Unanswered
janyalda17
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Yes, that's possible. How exactly you do it is going to depend on your app setup and build/framework, but there are several examples in other discussions: #465, #463 (comment). |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've been attempting to filter out some routes that should only be visible to authenticated users, following the Ziggy docs I'm able to group the routes and use the
@routes
directive passing the group name inapp.blade.php
to only share those routes.But where I'm having trouble is after logging in they don't change and I get Ziggy front-end errors until I refresh the page and I get the right routes then it works, this is what I initially thought would do it which is the following conditions in
app.blade.php
:So what I'm wondering is if there is a way to dynamically send back the needed routes based on the auth check at the point where a user is logging in, or is this not possible?
Beta Was this translation helpful? Give feedback.
All reactions