Add all files

This commit is contained in:
root
2025-11-30 11:57:22 +01:00
parent 2ee51cac4f
commit 044271db3d
1476 changed files with 142544 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('ext_custompages_pages', function (Blueprint $table) {
$table->engine = 'InnoDB';
// content
$table->id();
$table->string('title');
$table->string('slug')->unique();
$table->text('content');
// toegang
$table->enum('visibility', [
'everyone',
'customers',
'admins',
'guests',
'logged-in',
])->default('everyone');
// menu en published
$table->boolean('visible_in_menu')->default(false);
$table->boolean('is_active')->default(true);
// expiry
$table->timestamp('expires_at')->nullable();
// metadata
$table->string('meta_title')->nullable()->after('title');
$table->text('meta_description')->nullable()->after('meta_title');
$table->string('meta_image')->nullable()->after('meta_description');
$table->string('meta_color')->nullable()->after('meta_image');
$table->string('meta_favicon')->nullable()->after('meta_color');
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('ext_custompages_pages');
}
};

View File

@@ -0,0 +1,25 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('page_views', function (Blueprint $table) {
$table->id();
$table->foreignId('page_id')->constrained('ext_custompages_pages')->onDelete('cascade');
$table->ipAddress('ip_address');
$table->string('user_agent')->nullable();
$table->timestamp('viewed_at')->useCurrent();
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('page_views');
}
};