When I open test.example.com/main
I expect a 404 error because this route is not defined in subdomain routes. but main domain routes works for subdomain. So route Route::get('/main' ...
runs and looks valid while it must not be valid.
My routes/web.php
:
Route::domain('test.example.com') -> group(function () {
Route::get('/sub', function(){
return view('sub.index');
});
});
Route::get('/main', function(){
return view('main.index');
})