weixin_39805851
weixin_39805851
2020-11-28 15:28

Conflicting routes

I guess I don't understand this part of documentation https://tenancy.samuelstancl.me/docs/v2/tenant-routes/#conflicting-routes

In my web.php I have:

php
Route::get('/', 'RegisterController')->name('app.index');

and in my tenant.php:

php
Route::get('/', 'DashboardController')->name('dashboard.index');

Even with ->domain($domain) option in mapWebRoutes() tenant routes still overwrite GET / and app.index route is not available (because tenant routes are loaded for all domains, including those listed in exempt_domains and it overwrite web routes).

For now I added the condition if ($extempt_domain === $current_domain) return; in routes/tenant.php, but maybe I can do it without such hack?

该提问来源于开源项目:stancl/tenancy

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

5条回答