Laravel Community Tools by Tighten

Brian Gallagher

Joined: 12 years ago
Total tricks: 1
Last trick: 12 years ago

Submitted tricks

Route::filter() passes multiple filter params as individual values like function($route, $response, $param1, $param2 ...) this is an easy way to check against multiple params. If I'm checking permissions like this ->before('permission:user,moderator') this makes it easy to check against. Since Route::filter() passes $route and $response in a BEFORE filter the array_slice strips them out of the array to allow you to check against the values you want.
bgallagh3r 12 years ago 8451