Laravel 13 + Filament 5 admin panel and REST API for a non-profit developer collective, backed by the Pireon OAuth identity server. The public site is a separate, server-rendered application consuming /api/public/v1. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
37 lines
970 B
PHP
37 lines
970 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
/**
|
|
* Runtime settings the panel can change without a deploy.
|
|
*
|
|
* Kept in the database rather than in .env precisely because that is the
|
|
* point: putting the public site into maintenance has to be something an
|
|
* administrator can do from the panel at 2am, not something that needs a
|
|
* release.
|
|
*/
|
|
return new class extends Migration
|
|
{
|
|
public function up(): void
|
|
{
|
|
Schema::create('settings', function (Blueprint $table) {
|
|
$table->string('key')->primary();
|
|
|
|
// JSON so a setting can be a flag, a date, or a translated map
|
|
// without needing a column per shape.
|
|
$table->jsonb('value')->nullable();
|
|
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('settings');
|
|
}
|
|
};
|