Laravel Community Tools by Tighten

Popular tricks

458 tricks
I think this is very nice and simple :D You can modify at will you. I think this will save the use of `use` when you make a controller that has a namespace
gravitano 12 years ago 15137
How to add Multiple pagination in one page
Mahmoudz 11 years ago 15097
5.0
The Authorization feature that was introduced in 5.1.11 is designed around the idea of associating models with policies, but sometimes you want to be able to define an encompassing policy to check for capabilities at a higher level, in which case checking against models might not make sense. This trick allows defining abilities in the gate based on the methods defined in a policy class.
Riari 11 years ago 15032
5.0
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... 11 years ago 15037
5.0
Suppose you want to use Laravel query builder to search items in your db like this ?filter[search]=yourkeyword
SlimGee 2 years ago 15011
Hi guys, well let me share with you this trick that you may not know: isn't going to be great to use collection methods with your own array . well laravel make this simple , we can know turn our arrays to collections and interact with its just as we do with eloquent collection .
anouarabds... 12 years ago 14854
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 12 years ago 14749
Nginx server configuration files
yuchao 12 years ago 14787
This is specific to using Redis for caching. You can group your keys in sections to allow for easily clearing the cache on just a section of data. Couple notes: 1. You have to have 'cluster' set to false in app/config/database.php under the 'redis' key. 2. Remember to pass through variables into the closure with 'use'. 3. Have fun!
gerob 12 years ago 14712