Support the ongoing development of Laravel.io →
Views Blade Forms

So as my application grows in complexity, there are many forms that have jQuery event driven conditionals (think if $('#dropdown_item1') is selected, then Y or Z happens. My application also uses modals for viewing and editing items.

I have a few problems with this:

* Appending entire modals in jQuery is annoying (harder to maintain code)
* In an index view, all the modals have to be created by an iteration so the table buttons work
* Code is too tightly coupled, I'm afraid one design change is going to take much much longer than it needs to
* Blade and jQuery doesn't look pretty

My question is, what's the best practice to include view logic in the most OO way? I feel like there's some frontend framework or templating method I'm not aware of. What do you guys do to make integrating modern effects easier?

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.