1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 21:14:03 +00:00
tenancy/src/TenantRouteServiceProvider.php
2019-10-14 20:11:34 +02:00

20 lines
555 B
PHP

<?php
declare(strict_types=1);
namespace Stancl\Tenancy;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider;
use Illuminate\Support\Facades\Route;
class TenantRouteServiceProvider extends RouteServiceProvider
{
public function map()
{
if (file_exists(base_path('routes/tenant.php'))) {
Route::middleware(['web', 'tenancy'])
->namespace($this->app['config']['tenancy.tenant_route_namespace'] ?? 'App\Http\Controllers')
->group(base_path('routes/tenant.php'));
}
}
}