Laravel Community Tools by Tighten

Recent tricks

459 tricks
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 15993
For example, if you are using a caching server which listens on HTTPS, which retrieves your content from another (local server) which isn't using HTTPS, your links might be generated as http://mysite.com instead of the desired https://mysite.com. With this trick you can circumvent this.
berendiwem... 12 years ago 9272
Further explanation: http://www.codinghobo.com/re-organising-laravel-applications-with-psr-4/
rmasters 12 years ago 19383
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 8937
Uses "thepixeldeveloper/sitemap": "dev-master" in composer.json to create a better organised sitemap structure via multiple "files" (routes).
nik-418 12 years ago 11127
Combining Model Observers and Cache Tags for very simple but elegant automatic cache flushing on Eloquent Model updates. Can handle both a Model and its Relations easily!
nik-418 12 years ago 30558
Here's a simple little scope that you can use to get a random collection of Model objects from the database.
davidhemph... 12 years ago 11820
Use this to generate a select box from a Eloquent Collection
xLink 12 years ago 11482
For those who don't know. These ways of code are equivalent.
egig 12 years ago 10420