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

Occasionally sets previous variables using Laravel Octane #140

Open
jeremy-smith-maco opened this issue Oct 31, 2022 · 0 comments · May be fixed by #141
Open

Occasionally sets previous variables using Laravel Octane #140

jeremy-smith-maco opened this issue Oct 31, 2022 · 0 comments · May be fixed by #141

Comments

@jeremy-smith-maco
Copy link

We are using Laravel Octane and it will sometimes put the previous request's variables into the current request. Putting a breakpoint in the LaravelViewBinder class, it will get hit multiple times with the same variables or with other variables from the previous request which are no longer valid for the current request.

I am not sure what is causing it but I am guessing something is cached in the Octane instance which is not refreshing. I am not sure how to get around it either, other than manually doing the JS parsing myself.

jeremy-smith-maco added a commit to jeremy-smith-maco/PHP-Vars-To-Js-Transformer that referenced this issue Oct 31, 2022
After the JS has been echo'd to the blade template, remove the event listener. Appears to work in our Laravel Octane application and works with multiple binds in a single request.
@jeremy-smith-maco jeremy-smith-maco linked a pull request Oct 31, 2022 that will close this issue
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 a pull request may close this issue.

1 participant