id(); $table->foreignId('user_id')->constrained()->cascadeOnDelete(); $table->foreignId('category_id')->nullable()->constrained()->nullOnDelete(); $table->string('title'); $table->string('file_path')->nullable(); $table->date('expires_at'); $table->timestamps(); $table->index(['user_id', 'expires_at']); }); } public function down(): void { Schema::dropIfExists('certificates'); } };