Protecting Routes with Invoke

Tutorials

June 30th, 2015

[![Protect Laravel Routes with Invoke](https://i1.wp.com/wp.laravel-news.com/media/2015/06/laravel-invoke.png?resize=525%2C261&ssl=1)](http://blog.phpdeveloper.org/2015/06/24/laravel-route-protection-with-invoke/)
Photo by Pixabay
Chris Cornutt has a new tutorial showing how to implement the [Invoke package with Laravel](http://blog.phpdeveloper.org/2015/06/24/laravel-route-protection-with-invoke/) to restrict routes.

For those not familiar with Invoke:

The Invoke system helps you protect your application based on the endpoints and the URI requested. It uses a configuration file (or array of settings) to define the permissions needed to request a resource. For example, it will let you define things like:

“For this endpoint, I want to allow only authenticated users that have the group named ‘test’ to get through”.

Chris goes through the installation, setup, and creates an example middleware.

Filed in:

Eric L. Barnes

Eric is the creator of Laravel News and has been covering Laravel since 2012.