Skip to content
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

WIP - Support Livewire #93

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ivanvermeyen
Copy link
Contributor

@ivanvermeyen ivanvermeyen commented Apr 8, 2023

Support Livewire (#58)

Attempt to create a fresh Request from the current URL.

If this works we can pass Livewire::originalUrl() when the {locale}/livewire/message/{name} endpoint is accessed.

Unfortunately Livewire::originalUrl() does not include the query string.

@ivanvermeyen ivanvermeyen changed the title WIP - Support Livewire WIP - Support Livewire (#58) Apr 8, 2023
@ivanvermeyen ivanvermeyen changed the title WIP - Support Livewire (#58) WIP - Support Livewire Apr 8, 2023
@gwleuverink
Copy link

This looks great @ivanvermeyen! That should probably do it

I'll swap this for my hacky workaround and see if I run in to any compatibility issues

I can make some time to get back into it somewhere next week 👍🏻

@tomas-doudera
Copy link

Hello, do you plan to add PR to package? I have same problem with livewire.

@ivanvermeyen
Copy link
Contributor Author

Hello, do you plan to add PR to package? I have same problem with livewire.

Because I don't use Livewire myself, I'm a bit hesitating to merge this.
I can't easily test it and assure that it is working.

However, if you want to try this, you can just download the updated SetLocale middleware and use that instead of the one in the main repo. It has not been tested with Livewire 3 though.

https://github.com/codezero-be/laravel-localized-routes/blob/d7b92c5f57e99608802a99e5ccea0f62e2453350/src/Middleware/SetLocale.php

@ianfortier
Copy link

Same problem with Livewire

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants