Laravel Community Tools by Tighten

Recent tricks

458 tricks
An easy way to organize a large number of routes.
rcoble 10 years ago 6436
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 10 years ago 7134
This snippet will allow you to add to the request. Tested in Laravel 5.2
wolf 10 years ago 8593
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 10 years ago 7616
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 10 years ago 32419
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 10 years ago 7146
Migration file sample for Pivot table
Mahmoudz 10 years ago 30446
Dynamically testing and Pagination feature in a Restful API
Mahmoudz 10 years ago 12936
Append array in $request::all() while saving data in laravel 5.2
mlselegant 10 years ago 10068