5e32f82b3a
- Laravel 12 base - Filament 5 (default admin panel) - Stancl/Tenancy v3 (config + migrations only) - Spatie Permission - Octane FrankenPHP runtime - Sanctum - Dockerfile multi-stage (composer + node + frankenphp:8.4) - Entrypoint runs migrations + caches on boot - .env.example pre-completat cu hosturi interne Coolify - Health endpoint /up Repo init pentru multi-tenant SaaS pe Coolify Hetzner.
30 lines
845 B
PHP
30 lines
845 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
use Stancl\Tenancy\Middleware\InitializeTenancyByDomain;
|
|
use Stancl\Tenancy\Middleware\PreventAccessFromCentralDomains;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| 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',
|
|
InitializeTenancyByDomain::class,
|
|
PreventAccessFromCentralDomains::class,
|
|
])->group(function () {
|
|
Route::get('/', function () {
|
|
return 'This is your multi-tenant application. The id of the current tenant is ' . tenant('id');
|
|
});
|
|
});
|