Replies: 3 comments 13 replies
-
Where and how exactly are you generating this specific URL? Is that the URL in the browser or is it a link on the page? Please include the code itself. Thanks. |
Beta Was this translation helpful? Give feedback.
-
thank you very much for your reply i am generating this route in vue component using ziggi library (great product, very helpful!!! thanks a lot) route() in vue works well with all local (uk,pl,en) but i need to not display the /en/ segment in the url when en=null should be like this http://domain.loc/real-estate/17-shop 200ok help solve this problem! here is my vue component snippet where i generate url
here is my app.js
==============
here is my connected Ziggy
I will be very grateful for your help |
Beta Was this translation helpful? Give feedback.
-
I just came across this. If the route contains an optional parameter like so:
and import routes from './routes.json'
route('page', {page: 'just-some-page'}, undefined, routes) you end up with a URL like this:
|
Beta Was this translation helpful? Give feedback.
-
Hello, help me to set the default locale , but should not be displayed in the url
i also use this extension https://github.com/mcamara/laravel-localization, there are middlewares,
here is my router
here is my middleware setLocale
when local == uk
in vue component
http://domain.loc/uk/real-estate/17-shop Great result!!!! 200 ok
when local == pl
in vue component
http://domain.loc/pl/real-estate/17-shop Great result!!!! 200 ok
when local == en
I need the default language not to be displayed in the url
in middleware
URL::defaults(['locale' => null]);
in vue component
http://domain.loc//real-estate/17-shop Wrong bad result!!!! 404 error
and the result should be
in vue component
http://domain.loc/real-estate/17-shop Great result!!!! 200 ok
Please help me to set up ziggy or laravel correctly when 'locale' must be null
Beta Was this translation helpful? Give feedback.
All reactions