I feel like I have the same hesitations as you do. I was looking into this exact thing a while ago, and the general concensus seemed to be that your routes should be protected with policies, etc anyway so exposing them should not make a difference. Still makes me feel uneasy though.
Ziggy for Laravel routes names in VueJS
Hello,
While testing InertiaJS, I also test Ziggy to use Laravel routes names directly in VueJS.
But is it really a good idea to use Ziggy ?
Even if Ziggy allows to filter the routes according to some user authorizations for example, it exposes all the filtered routes in the JS script.
Perhaps it would be better to write the routes directly and entirely in the different axios requests and/or InertiaJS links.
What do you think about that ?
Thanks for your participation ;).
Vincent
I have an app that uses inertia for an app that only internal users can use. All routes are protected anyways, so I dont really care that they can see them. But I know that Johnathan, who wrote Inertia, dont use Ziggy himself but rather just write the routes when he needs them
Personally I just love the fact that I can change a route path and it just works, but if they dont change often, then this might not be worth much :)
Please or to participate in this conversation.