Laravel Community Tools by Tighten

Category "Views" tricks

71 tricks
If you know what nested sets are, and use lazychazer/laravel-nestedset package, and tried his example application (https://github.com/lazychaser/nestedset-app), then here is a snippet for replace his simple nav rendering to bootstrap (3.x) navbar compatible output. (Laravel 5 solution)
subdesign 10 years ago 11987
5.0
This trait allows you to save any column from any model into a location within the storage directory to allow the column to be blade compilable with view()->file($model->getViewableColumnPath('column_name')); The trait
leemason 10 years ago 6864
You’re using Laravel 5 and you want to switch from less (which is used by default) to sass? Here is some steps that you can follow in order to make that transition.
mercuryser... 10 years ago 14697
5.0
When user clicks on "delete" button, open a confirmation box before deleting an item.
ismaeltoe 10 years ago 46639
Iteratively display "page breadcrumbs" - ideal for a partial.
Dombo 10 years ago 97197
Auth::attempt($auth) giving problem. ErrorException in ClassLoader.php line 317: Uninitialized string offset: 0
Sanjar7 10 years ago 9870
5.0
Temporarily log in as another user, but switch back to the original user at any time. Inspired by the User Switching plugin for WordPress. I use this for testing data being shown based on user role.
dawiyo 11 years ago 18498
Hi, I got the example by Dastan Turysbekov (http://laravelsnippets.com/snippets/menu-activated) and changed a little bit. It's a simple Macro to use with Active Menu. You can use parameters and attributes as well.
marcelofer... 11 years ago 9960
I like to set body id/class from within the child view (for css purposes). Previously I was passing this information to the view from the controller but decided I didn't like that, so I came up with this.
jwalton512 11 years ago 10373