Sep 21, 2023
0
Level 13
Ziggy routes in HandleInertiaRequests
I am playing around with the new Breeze+Inertia+Vue setup and noticed the routes for ziggyjs are now included in the share method of HandleInertiaRequests. I wonder why this is?
At first I thought, this wil refresh ziggy's routes on every navigation. However, it seems these routes aren't used...
To check this, I added an unknown route to Dashboard.vue:
{{ route().has('this-is-a-new-route') }}
Then build the project (to prevent the page from automatically being reloaded). Without refreshing the app I added the new route and navigated to the dashboard. Here it says "false" (route is unknown to ziggy) until you hit refresh.
Please or to participate in this conversation.