Refactor code for consistency and clarity; update seeder comments, enhance error handling, and improve API routes. Added 'original' field to ProductMediaResource and adjusted various formatting issues across multiple files.

This commit is contained in:
Mekan1206
2026-02-20 15:33:29 +05:00
parent a8599d9c79
commit 1e84ceab3c
27 changed files with 314 additions and 51 deletions

View File

@@ -0,0 +1,24 @@
<?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('selected_categories', function (Blueprint $table) {
$table->id();
$table->jsonb('name');
$table->jsonb('description')->nullable();
$table->boolean('is_visible')->default(true);
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('selected_categories');
}
};

View File

@@ -0,0 +1,23 @@
<?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('category_selected_category', function (Blueprint $table) {
$table->id();
$table->foreignId('selected_category_id')->constrained()->cascadeOnDelete();
$table->foreignId('category_id')->constrained()->cascadeOnDelete();
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('category_selected_category');
}
};