Laravel Community Tools by Tighten

Category "Routing" tricks

92 tricks
Perform CSRF filter on all post, put, patch, and delete requests through constructor of the BaseController.
mhanson01 12 years ago 18576
I like namespacing my controllers. I think it cleans up my structure a bit, and prevents me from having to 'composer dump-autoload' everytime I make a new controller. Though it is very convenient to namespace your controllers, your routes file can quickly become very messy. Luckily, Laravel 4.1 offers a great solution for this, namely the 'namespace' option in Route::group().
stidges 12 years ago 74072
4.1