1
我正在使用通配符子域,并希望将$element
变量传递给中间件白标签,以便我可以检查子域并进行相应的响应。将变量传递到中间件Laravel
Route::group(['domain' => '{element}.website.co', 'middleware' => 'whitelabel'], function() {
Route::get('/', '[email protected]');
Route::post('/', '[email protected]');
});
如何使用中间件内的元素值?