Laravel Community Tools by Tighten

Category "Templating" tricks

34 tricks
blade extension that displays numbers in Farsi instead of Latin ( "۵" instead of "5").
reshadman 11 years ago 7966
sometime we need to autocomplete one input area and based on the value of this input area we sometime populated a dynamic dropdown . I thought it worth sharing .
hassanjama... 11 years ago 35612
This function will allow you to forget about cache busting mechanisms. It will use your desired method of cache busting, either <filename>.<buster>.<extension> (default) or <filename>.<extension>?<buster>. You can use this to replace asset() entirely and never worry about updating those pesky cache busters whenever you update a file!
stidges 11 years ago 14351
Generate navigation menu's that look clean using a custom class HTML::nav(); Automatically set active state, use conditions to display links, and optionally pass only one value for both url and link name if you want to type a little less
residualfl... 12 years ago 15824
This macro has the same signature than HTML::linkRoute() but wraps the hypertext link with <li></li>. If the current URL is the specified route, then <li> becomes "active" (<li class="active>...</li>). I use it to quickly build menus. Work well with Bootstrap.
Matt 12 years ago 8709
Sometimes you want to render a partial without sharing all the scope. I often found that the scope inheritance between highly decoupled UI modules makes hard to find errors, because we end up using similar variable names in each module (using @include) Let me show you an example:
fedeisas 12 years ago 10226
In the background create your paginated response however you wish.
clouddueli... 12 years ago 48364
Creating a form macro is very easy and awesome for creating your own UI elements. The original downside I found was losing the automatic model binding from Form::model(). A user on StackOverflow helped solve the problem for me.
chadwithuh... 12 years ago 10173
An easy helper method that will assist in setting active classes for navigation items based on the current route.
mattems 12 years ago 27648