0

I am working in one of my projects.In project i have different domain like (abc.xyz.cc , pqr.xyz.cc, mno.xyz.cc).and in domain we assign different route file in RouteServiceProvider.

Code

protected function mapAdminRoutes()
{
    Route::middleware('web')
        ->namespace($this->adminNamespace)
        ->group(base_path('routes/admin.php'));
}

protected function mapDealerRoutes()
{
    Route::middleware('web')
        ->domain(config('domains.dealers_domain'))
        ->namespace($this->dealerNamespace)
        ->group(base_path('routes/dealer.php'));
}

protected function mapAccountantRoutes()
{
    Route::middleware('web')
        ->domain(config('domains.accountant_domain'))
        ->namespace($this->accountantNamespace)
        ->group(base_path('routes/accountant.php'));
}

so in dealer.php file i add route

Route::get('dashboard', 'HomeController@getDashboard')->name('dashboard');

in accountant.php file i add route

Route::get('dashboard', 'HomeController@getDashboard')->name('accountant:dashboard');

in admin.php file i add route

Route::get('dashboard', 'DashboardController@getDashboard')->name('admin:dashboard');

but when i access route('accountant:dashboard') get error:

HttpException No message

So please help me.

Thanks in advance!

Jinal Somaiya
  • 1,931
  • 15
  • 29

0 Answers0