1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 11:44:04 +00:00

Simplify if condition in TenantRouteServiceProvider

This commit is contained in:
Samuel Štancl 2019-10-14 20:11:34 +02:00
parent 407eb183b7
commit dbed57fcf8

View file

@ -11,8 +11,7 @@ class TenantRouteServiceProvider extends RouteServiceProvider
{ {
public function map() public function map()
{ {
if (! in_array(request()->getHost(), $this->app['config']['tenancy.exempt_domains'] ?? []) if (file_exists(base_path('routes/tenant.php'))) {
&& file_exists(base_path('routes/tenant.php'))) {
Route::middleware(['web', 'tenancy']) Route::middleware(['web', 'tenancy'])
->namespace($this->app['config']['tenancy.tenant_route_namespace'] ?? 'App\Http\Controllers') ->namespace($this->app['config']['tenancy.tenant_route_namespace'] ?? 'App\Http\Controllers')
->group(base_path('routes/tenant.php')); ->group(base_path('routes/tenant.php'));