Laravel Community Tools by Tighten

Recent tricks

458 tricks
An easy way to organize a large number of routes.
rcoble 9 years ago 6384
5.0
If you want to use(or work with) another database in a section of your project use following steps... step 1. Create another connection in config/database.php step 2. Insert new connection info in .env file... step 3. Tell to laravel to use this new connection
tuytoosh 9 years ago 7007
This snippet will allow you to add to the request. Tested in Laravel 5.2
wolf 9 years ago 8497
5.0
In some cases Netshell/Paypal throws error "Class Paypal does not exist". In my case on ubuntu/php7/nginx (on windows with apache is ok). So here is simple workaround
escapeboy 9 years ago 7514
I was looking for a way to change the .env-values within a controller or from something else. I found nothing, so I created my own little method. It takes an array of new values. The array key must be the key from the .env. The script overwrites the old .env. Yet not perfect, but works for now. UPDATE: I am developing a package which will provide this functionality in a better way. The package will ship with some more features. UPDATE: Here is the Link to the Package: https://github.com/Brotzka/laravel-dotenv-editor. Give it a try ;) There will be more features in a few days.
Brotzka 9 years ago 32275
5.0
Don't forget to add the `DATABASE_QUERIES_DEBUG` in the .env file. Call this function `$this->debugDatabaseQueries()` from any service provider `register` function:
Mahmoudz 9 years ago 7084
Migration file sample for Pivot table
Mahmoudz 9 years ago 30365
Dynamically testing and Pagination feature in a Restful API
Mahmoudz 9 years ago 12863
Append array in $request::all() while saving data in laravel 5.2
mlselegant 10 years ago 10019