This commit is contained in:
f4ilji
2025-03-14 14:35:49 +05:00
parent 7a7ecf7b0d
commit 17518ceed2
21 changed files with 579 additions and 62 deletions
@@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('sliders', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->boolean('is_active');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('sliders');
}
};
@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('slides', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->text('content');
$table->string('image');
$table->string('link');
$table->string('link_text');
$table->string('color_theme');
$table->boolean('is_active')->default(true);
$table->integer('sort')->nullable();
$table->foreignId('slider_id')->references('id')->on('sliders')->onDelete('cascade');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('slides');
}
};