Protecting Package Routes With Wave
I've created a custom package with it's own routes, which work fine with no middleware.
Upon reading the documention, which seem clear enough, I can either wrap the routes in a middleware group or append the middleware to the end of the route definition.
I've tried:
Route::group(['middleware' => 'wave'], function(){ Route::get('campaigns','\Adonis\Leads\Controllers\LeadController@index')->name('campaigns'); });
and Route::get('campaigns','\Adonis\Leads\Controllers\LeadController@index')->name('campaigns')->middleware('wave');
Irrespective of which I use I'm always redirected to the dashboard, what am I doing wrong here?
Changing the middleware to 'web' allows access to this page when logged in as I've added the auth check in the constructor.
I probably need to restrict this to the 'wave' middleware though so if the account subscription has expired the customer should not have aceess and shou;d be forwarded to the renew page to select a plan.