If I click on the blog button than generate blog.test.local and click on the home button than generate test.local so how can I check domain URL an sub-domain URL.
Route::domain('{account}.test.local')->middleware('mymiddle')->group(function () {
Route::any('/', 'Blog\BlogController@index')->name('blog');
});
if sub-domain blog exits than call blog.test.local. and if I click on the home then call test.local normal url.
How can I check ? I create middleware but it didn't solve the problem :
public function handle($request, Closure $next)
{
URL::defaults(['account' => request('account')]);
return $next($request);
}