I think this is the part that result in your problem:
Route::group(array('domain' => '{account}.' . $siteUrl), $subdomainRoutes);
Route::group(array('domain' => $siteUrl), $mainRoutes);
You can try to create a regular expression constraint for the account variable, see: https://laravel.com/docs/9.x/routing#parameters-regular-expression-constraints
Or maybe a more uggly way that can possible help:
Route::group(array('domain' => 'www.' . $siteUrl), $mainRoutes);
Route::group(array('domain' => '{account}.' . $siteUrl), $subdomainRoutes);
Route::group(array('domain' => $siteUrl), $mainRoutes);
I didn't test the options so maybe it doesn't work.
rassemdev, driesvints liked this reply
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community