Don't check domain value at route().current()
See original GitHub issueDescription
I’m developing a Laravel 8 project locally and can access it via both (and many more) localhost
and blahblah.test
domains. I configured Laravel’s APP_URL
as “http://blahblah.test”. And ran @php artisan ziggy:generate "resources/js/ziggy.js"
via Composer post-autoload-dump
script. Well, when I open the site at http://blahblah.test/ I see the correct work of route().current('dashboard')
(I have this named route and it exists in resources/js/ziggy.js
). But when I open http://localhost/ - the function doesn’t work properly (with any named route). If I set APP_URL
to “http://localhost/”, the result is mirrored: works for http://localhost/ and not for http://blahblah.test/.
I should note that I use your library in VueJS environment.
Suggestion
I propose to don’t include domain proto, name, and port to the algorithm of route().current()
to give an ability of this function to work on deployment with a lot of different domains which point to the same back-end.
Alternatives
Idk
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (1 by maintainers)
I am experiencing a similar issue to this, but between
http://testsite.local
andhttp://testsite.local:3000
– in other words, when I am using Browsersync which usually uses port 3000.Would the issue I am experiencing be covered by what is being discussed in this issue, or should I open up a separate issue and describe things in more detail?
Yep, deployment in one domain environment works fine. But projects like a platform of landing pages (multiple websites managed by one back-end) will feel this issue. I mean Laravel projects where
APP_URL
is not defined.