bigIncrements('id'); $table->unsignedBigInteger('section_id'); $table->unsignedBigInteger('parent_id')->default(0); $table->string('name')->unique(); $table->decimal('commission_rate', 5, 2); $table->text('description')->nullable(); $table->string('picture')->nullable(); $table->string('url'); $table->string('meta_title')->nullable(); $table->string('meta_description')->nullable(); $table->string('meta_keywords')->nullable(); $table->tinyInteger('status')->default(1); $table->timestamps(); $table->foreign('section_id')->references('id')->on('sections')->onDelete('restrict'); $table->index('name'); $table->index('section_id'); }); } public function down(): void { Schema::dropIfExists('categories'); } }