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
This post is submitted by one of our members. You may submit a new post here.