Laravel Community Tools by Tighten

Popular tricks

458 tricks
With database seeding you can fill your database with dummy data with simple command. I created code that will fill users table with some data. users table consists of three columns (username,email,biog).
Clivern 12 years ago 58528
When you need to pass some data to the Mail::send or Mail::queue, you need to make use of the "use" approach:
aglipanci 12 years ago 56544
Handling findOrFail exceptions
bwsewell 12 years ago 54396
If you're like me, you don't like to keep repetitive ->where()'s in your routes file, this is where route patterns come in handy. Makes your routes file DRY too, especially when you'll need to change some expression.
vlakarados 12 years ago 51819
In the background create your paginated response however you wish.
clouddueli... 12 years ago 48793
On many occasions, I use the subdomain to generate dynamic routes and a custom user experience. The current Laravel subdomain filter, requires a lot of extra work when generating routes. Each time you generate a route, using the laravel route() helper, you have to pass the subdomain as the first parameter. This provides an alternative method without having to pass the subdomain to route(). https://github.com/laravel/laravel/issues/2515 for additional follow-up
jaketoolso... 12 years ago 47414
When user clicks on "delete" button, open a confirmation box before deleting an item.
ismaeltoe 11 years ago 47068
Since Eloquent doesn't do a real join when using "with" this will add a simple join method without having to worry about the join columns since it's all stored with the models anyway. It will also select all the columns from the joined table with an added prefix of the table name.
phazei 12 years ago 45787
Laravel Settings to create your website and model settings in an easy way, you can find all details about the package here: https://github.com/yazan-alnugnugh/laravel-settings
yazan-alnu... 4 years ago 45372