Laravel Community Tools by Tighten

Popular tricks

458 tricks
wrong and right way to write eloquent
sanjok1988 5 years ago 8499
Route::filter() passes multiple filter params as individual values like function($route, $response, $param1, $param2 ...) this is an easy way to check against multiple params. If I'm checking permissions like this ->before('permission:user,moderator') this makes it easy to check against. Since Route::filter() passes $route and $response in a BEFORE filter the array_slice strips them out of the array to allow you to check against the values you want.
bgallagh3r 12 years ago 8483
Make your dynamic post caching for load your website post fast.
haruncpi 5 years ago 8454
If you find out, that your blade template is empty and no error message generated: double check your comments
mring 12 years ago 8435
Laravel Invisible reCAPTCHA Example – Laravel Validate Form on Submit using Google reCaptcha
dave 8 years ago 8440
I use this to always know in my controllers if the current action is shown through a Facebook tab iframe. Upon the first request this checks if there is a "signed_request" variable posted to the page. Then $fb_state is set to true and shared with all views. The problem is that on navigating to the next page within your app this variable is lost and you don't know if this is shown through facebook. Due to the FB page proxy you can't use sessions to remember this for the next request either. I solve this problem with adding "signed_request" as a parameter (i.e. "&signed_request=123ljshgljsdhflsdhfl") to every link and form when $fb_state == true. Of course you could also pass any other variable if you don't need the actual signed_request data.
flei 11 years ago 8373
If you’re using blade, you can use the following to easily output style and script tags.
hengkiardo 11 years ago 8357
This script is for generating copies of uploaded images in different sizes. In my case I created a custom Library folder and then created a class FileUploader and add all functions that deals with any image uploads.
yandine 9 years ago 8288
5.0
You can see SQL Query of your DB table on Laravel App, by Event listener.
ahaneef29 10 years ago 8264