Closed jeanali closed 3 years ago
Yes this is possible, you would set it up in your Laravel app. It's in the docs under URL Generation > Default Parameters.
Basically, in a middleware or service provider, call URL::defaults(['stores' => 'your-default-value']);
. Note that this will affect all route parameters called stores
, in all routes.
Closing because this isn't directly a Ziggy concern, but feel free to reply again if you have any other questions!
Is there any way to put default to the route?
Like have this structure
route('stores.products.index');
in my route & I need to make thestores
defult in the route and being like thisroute('products.index');
without each time putstores
each time!I'm using this pacakge with
inertiajs