Laravel Community Tools by Tighten

Category "Routing" tricks

92 tricks
We have released the source code of this website! You can check out the repository containing a mirror copy of this website: https://github.com/CodepadME/laravel-tricks to create your own websites like Laravel-tricks. It uses PSR-2 coding standards, a ton of libraries and packages and is a good resource to take a look into.
msurguy 12 years ago 9821
Will validate a route pattern against the current route.
eugene_san... 12 years ago 9941
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 6736
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 9285
Uses "thepixeldeveloper/sitemap": "dev-master" in composer.json to create a better organised sitemap structure via multiple "files" (routes).
nik-418 12 years ago 11138
In the official docs : http://laravel.com/docs/responses#special-responses, need to do `Response::json(...)` to create json response. Actually, if the returned value is an array or instance of arrayableinterface or jsonableinterface such as eloquent model, you could just return it, it'll be a json, magically.
egig 12 years ago 72487
A Controller-based solution to add the CSRF filter to all POST requests.
danalloway 12 years ago 9086
Laravel 4 CSRF on all POST requests
localdisk 12 years ago 10260
Do not trust the client. Safe way to get CSRF token for use in Angular JS. Keeps it as a constant.
xtrasmal 12 years ago 42333