Laravel Community Tools by Tighten

Category "Views" tricks

71 tricks
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 35619
If you’re using blade, you can use the following to easily output style and script tags.
hengkiardo 11 years ago 8346
Pull a ready-to-go array from an Eloquent model to build a dynamic dropdown in your views
dexbarrett 12 years ago 148532
Avoid casting views to strings. If your view contains an error, casting with `(string)` will cause a less-than-helpful exception to be thrown, pertaining to throwing an exception within the view's `__toString()` method. Use `View::make()->render()` instead.
kwoodfrien... 12 years ago 23316
Response::xml macro
localdisk 12 years ago 32585
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 10231
Submit links to a DELETE route with a confirmation box.
jgoux 12 years ago 17572
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 12920
An easy helper method that will assist in setting active classes for navigation items based on the current route.
mattems 12 years ago 27649