Laravel Community Tools by Tighten

Tag "4.0" tricks

68 tricks
Perform pattern based CSRF filter on all post, put, patch, and delete requests. Just add this code snippet at the top of routes.php
Illusion 12 years ago 6630
For example, if you are using a caching server which listens on HTTPS, which retrieves your content from another (local server) which isn't using HTTPS, your links might be generated as http://mysite.com instead of the desired https://mysite.com. With this trick you can circumvent this.
berendiwem... 12 years ago 9122
Further explanation: http://www.codinghobo.com/re-organising-laravel-applications-with-psr-4/
rmasters 12 years ago 19246
Use this to generate a select box from a Eloquent Collection
xLink 12 years ago 11365
For those who don't know. These ways of code are equivalent.
egig 12 years ago 10258
A Controller-based solution to add the CSRF filter to all POST requests.
danalloway 12 years ago 8974
Sometimes you need to use some packages only in your local environment, like for debug purposes. You can include service providers in your local configuration file app/config/local/app.php. You have to worry about indexes since if you just paste service provider, it will overwrite one with same index in original configuration.
lazychaser 12 years ago 9027
Laravel 4 CSRF on all POST requests
localdisk 12 years ago 10150
In the background create your paginated response however you wish.
clouddueli... 12 years ago 48434