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

Laravel Octane - values leaking from prior requests #35

Closed
benbjurstrom opened this issue May 3, 2024 · 0 comments · Fixed by #36
Closed

Laravel Octane - values leaking from prior requests #35

benbjurstrom opened this issue May 3, 2024 · 0 comments · Fixed by #36

Comments

@benbjurstrom
Copy link
Contributor

Using this package with Laravel Octane causes any values that aren't explicitly set on the current page to be filled with data from other pages that were populated on prior requests.

I believe the fix is to register the SEOManager as a scoped singleton in the SEOServiceProvider. Here's the relevant section of the docs:

Binding Scoped Singletons
The scoped method binds a class or interface into the container that should only be resolved one time within a given Laravel request / job lifecycle. While this method is similar to the singleton method, instances registered using the scoped method will be flushed whenever the Laravel application starts a new "lifecycle", such as when a Laravel Octane worker processes a new request or when a Laravel queue worker processes a new job

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