Laravel Community Tools by Tighten

Category "Routing" tricks

91 tricks
If you want to use Sentry 2 filters used in Laravel 4.x, you have to modify your system a little bit. <br/> First install Sentry 2 for Laravel 5: "composer require cartalyst/sentry:dev-feature/laravel-5" Next add these three files to your App\Http\Middleware folder, then add the references into the Kernel.php file. Finally, I added an example route how to use the Middlewares. An advice: in your controller replace all catch() lines from: catch (Cartalyst\Sentry\Users\LoginRequiredException $e) {} to: catch (\Cartalyst\Sentry\Users\LoginRequiredException $e) {} because it won't work as in Laravel 4.x worked..
subdesign 11 years ago 15159
5.0
These are helper functions which allow you to write more concise router code:
imanghafoo... 11 years ago 9947
5.0
Set browser cache invalidation headers on a PER route basis using Route Middleware.
jhauraw 11 years ago 13553
Switching Maintenance Mode to Production And Vice Versa Quickly in laravel 4.2
dhrubo001 11 years ago 8531
CSRF is enabled by default on all Routes in Laravel 5, you can disable it for specific routes by modifying app/Http/Middleware/VerifyCsrfToken.php
aglipanci 11 years ago 38395
about using the CSRF filter in your forms. Often you will want to apply a filter to many routes. Instead of attaching the filter to each individual route, you can assign it to many routes at the same time as a group:
arduino731 11 years ago 7458
4.2
I've put the full namespaces in for science.
orlissenbe... 11 years ago 8513
Filter for minify html output. Put this code into \app\filters.php
gulch 11 years ago 26532
Route tanımlanan URI için, Closure aktarılacak değerlerin sınıflandırılması konusundaki desenler...
doguhan 11 years ago 7973