mauricius / laravel-htmx

Laravel helper library for Htmx
MIT License
301 stars 14 forks source link

isHtmxButNotBoosted() sugar function #16

Closed adicco closed 7 months ago

adicco commented 7 months ago

I often find myself having to determine whether an HTMX request is boosted or not, so as to know whether I should return partials or a full page, and it would be nice to not have to check both conditions every time, which is why I made this small sugar helper.

mauricius commented 7 months ago

I'm sorry, but I don't think this belongs in the package. Since it's just a sugar helper, it can be easily implemented in your code, for instance you can use a Trait and share it across your controllers (or you can use a macro).

adicco commented 7 months ago

Okay, thank you for the pointers, I will have a look.