-
Notifications
You must be signed in to change notification settings - Fork 821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ziggy location instead of base url #1078
Conversation
This recently got worked on by @prestonholt at #1069. @prestonholt was this working for you before? |
Yes I see that but usage of |
@driesvints I just tested and this wasn't working before #1069 either- this PR appears to fix the issue both pre and post #1069 changes. I also tried fixing by following @aarondfrancis method, but it isn't fixing the It seems like this PR fixes it because it keeps |
|
It seems to me that this PR indeed creates parity between the non-SSR and SSR versions when calling I've confirmed that before this tweak, Test Ziggy supports passing the Thanks @matthieumota for your PR!! |
Regarding |
I've opened a matching PR for breeze: laravel/breeze#163 |
I've noticed that using the URL property to handle the active route on Ziggy in SSR is not correct. Indeed, we need to know the current URL and the URL property returns the base URL of the application.
To reproduce the bug, just disable the JS and find that the active route in the menu does not work. With JS, it works because the client re-hydrates the server-generated DOM.
So, I think we need to get current URL via request and totally replace window.location so.