Laravel Community Tools by Tighten

Tag "macros" tricks

23 tricks
Use this to generate a select box from a Eloquent Collection
xLink 12 years ago 11348
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 10198
There are a few tips already for active states on navigation, however none are based on Route names. I prefer to use Route names for all routes, so here is a modified version of the "active states" trick for route names.
chadwithuh... 12 years ago 12939
An example of how I did my filters.php and routes.php to populate many of the same structured routes. Used Sentry 2 for Authentication and short syntax for array() Suggestions to make it even DRYer are welcome. php artisan route output of the example http://paste.laravel.com/1cnE
XoneFobic 12 years ago 12464
This trick is handy for wrapping all of your form elements with the same HTML/classes, which is especially useful for handling error states when using frameworks like Bootstrap or Foundation.
crhayes 12 years ago 12391