Laravel main domain routes works for subdomain - development

Laravel main domain routes works for subdomain

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

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');
})



from Laravel Questions and Answers https://laravelquestions.com/php/laravel-main-domain-routes-works-for-subdomain/
via Lzo Media

Comments

Post a Comment

Popular posts from this blog

How can I solve "laravel/horizon v1.1.0 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system"? - development

Using PHP and MySQL data to generate PDF letters like in MS Word mailmerge functionality - development

CORS issue between web/android/ios