Laravel Community Tools by Tighten

Popular tricks

458 tricks
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 11 years ago 21487
Laravel 5.4 Upload Image with Validation example
dave 8 years ago 21396
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 21048
Whoops, looks like something went wrong.
yuran 11 years ago 21086
When registering a model observer using `Model::observer(Observer::class)`, you can return false and laravel will cancel the method.
stevebauma... 10 years ago 21032
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 20932
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 20856
5.5
Automatically replace column with a translated value.
jesseyvano... 1 year ago 20808
GroupBy clause with multiple columns select in laravel
sanjok1988 5 years ago 20421