Closed bilogic closed 2 years ago
Please ignore above, it appears the turbo middleware is already handling turbo frames.
You can detect if the request was made targeting a Turbo Frame by checking if there's a Turbo-Frame header in the request (Turbo adds that). Something like this:
if (request()->headers->has('Turbo-Frame')) {
// handle differently...
}
I'm doing a search function and would like to submit the form as
GET
so that it updates the URL as well.Since there is a
wantsTurboStream
examining theaccept
header, does it make sense to addwantsTurboFrame
to examine for theturbo-frame
header? This way, backend will know to send a partial instead of the full render.