Laravel Community Tools by Tighten

Popular tricks

459 tricks
In case you want to access Route parameters outside controller, you can access current Route object and extract parameters from there.
YOzaz 12 years ago 22015
4.1
Laravel passes 100% test coverage on Hip Hop Virtual Machine (HHVM) so you might want to try using it to host your next Laravel application. The advantage of HHVM is an increase in speed of executing your PHP scripts and thus boosting your application. This config was provided by Taylor Otwell.
msurguy 12 years ago 21907
Laravel 5.4 Upload Image with Validation example
dave 9 years ago 21768
Using this package - http://csv.thephpleague.com/ In your controller or wherever you are calling this method from simply create a method like so: At the top you need to use: use League\Csv; That's about it, you should be good to go! Would like to thank @msurguy for his help on this too. - See more at: http://laravelsnippets.com/members/snippets/csv-data-manipulation-with-laravel#sthash.oqBx1dzA.dpuf
lstables 12 years ago 21620
If you only need the functionality of a custom rule once throughout your application, you may use a Closure instead of a rule object. The Closure receives the attribute's name, the attribute's value, and a $fail callback that should be called if validation fails. Below is the code example:
asifzcpe 5 years ago 21490
When registering a model observer using `Model::observer(Observer::class)`, you can return false and laravel will cancel the method.
stevebauma... 10 years ago 21411
Whoops, looks like something went wrong.
yuran 12 years ago 21307
Simply add the following lines to ./app/start/global.php at the "Application Error Handler" - Section there is no need to touch the "CSRF Protection Filter" at all.
etenzy 11 years ago 21173
if you want to run custom validation having a long function in laravel request file, you can use the following tricks to get the things done using withValidator method.
asifzcpe 5 years ago 21168
5.5