How to create custom Middleware to make a route group available only during testing
Catzie wrote a tutorial on how to create custom middleware to make a route group available only during testing.
I needed to protect a group of routes from everything except my testing environment. PHPUnit tests that depend on certain routes were needed to be ruun, but I don't want those routes to be available anywhere else. I'll share in this tutorial what I did to protect the routes inside the group from all access aside from PHPUnit.
Complete code samples are at the source of this Laravel tutorial
Link:
This post is submitted by our members. Submit a new post.
Tags: Tutorials Laravel 5 Laravel 5.1 Laravel 5.2 Intermediate