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

Add a $request->wasFromTurboFrame() macro #121

Closed
tonysm opened this issue Oct 23, 2023 · 0 comments · Fixed by #123
Closed

Add a $request->wasFromTurboFrame() macro #121

tonysm opened this issue Oct 23, 2023 · 0 comments · Fixed by #123
Labels
good first issue Good for newcomers

Comments

@tonysm
Copy link
Collaborator

tonysm commented Oct 23, 2023

We need to add a custom macro that checks if the request came from Turbo Frame, similarly than what we do with the wantsTurboStream() andwasFromTurboNative().

This new one should take an option $id param. When nothing is passed to it, should return true if there's a Turbo-Frame header in the request. When an $id param is given, it should also check if the value of the Turbo-Frame header is equal to the given $id. Otherwise, it returns false.

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

Successfully merging a pull request may close this issue.

1 participant