I am using wildcard subdomains and want to pass the $element variable into the middleware whitelabel so I can check the subdomain and respond accordingly.
Route::group(['domain' => '{element}.website.co', 'middleware' => 'whitelabel'], function() {
Route::get('/', 'AuthController@getLogin');
Route::post('/', 'AuthController@postLogin');
});
How would I use the value of element within the middleware?