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.
38 lines
732 B
PHP
38 lines
732 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateTenantsTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up(): void
|
|
{
|
|
Schema::create('tenants', function (Blueprint $table) {
|
|
$table->string('id')->primary();
|
|
|
|
// your custom columns may go here
|
|
|
|
$table->timestamps();
|
|
$table->json('data')->nullable();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('tenants');
|
|
}
|
|
}
|