We're already using the built-in
auth middleware that Laravel provides. We are going to create our own to make sure only subscribed users can get to certain sections of our site.
To create a middleware, run the following from the command line:
# will be created at app/Http/Middleware/Subscribed.php php artisan make:middleware subscribed
To use this middleware, it needs to be brought into
Table of Contents
protected $routeMiddleware = [ ...other middleware 'subscribed' => \App\Http\Middleware\Subscribed::class ];