id(); $table->foreignId('category_id')->constrained()->cascadeOnDelete(); $table->string('title'); $table->string('slug')->unique(); $table->text('description')->nullable(); $table->string('file_path'); $table->string('thumbnail_path')->nullable(); $table->boolean('is_active')->default(true); $table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete(); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('templates'); } };