WIP - Support Livewire
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.
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 👍🏻
Hello, do you plan to add PR to package? I have same problem with livewire.
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
Same problem with Livewire