Sub Domain Routing without Closures

Posted 3 years ago by james2doyle

Hello, I'm trying to do some subdomain routing, but I don't want to have inline Route::method commands with callbacks/closures.

Is there a way to do this without that?

 'middleware' => ['web'],
 'domain' => '{domain}.strideapp.local'], function () {
 // how do I avoid a closure here, but still include {domain}?
 Route::get('/{slug?}', 'FrontendController@serve')->name('serve');

Please sign in or create an account to participate in this conversation.