mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 08:24:04 +00:00
29 lines
823 B
PHP
29 lines
823 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
use Stancl\Tenancy\Middleware;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Tenant Routes
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Here you can register the tenant routes for your application.
|
|
| These routes are loaded by the TenantRouteServiceProvider.
|
|
|
|
|
| Feel free to customize them however you want. Good luck!
|
|
|
|
|
*/
|
|
|
|
Route::middleware([
|
|
'web',
|
|
Middleware\InitializeTenancyByDomain::class,
|
|
Middleware\PreventAccessFromUnwantedDomains::class,
|
|
Middleware\ScopeSessions::class,
|
|
])->group(function () {
|
|
Route::get('/', function () {
|
|
return 'This is your multi-tenant application. The id of the current tenant is ' . tenant('id') . "\n";
|
|
});
|
|
});
|