id(); $table->foreignId('payroll_entry_id')->constrained('payroll_entries')->onDelete('cascade'); $table->foreignId('employee_id')->constrained('users')->onDelete('cascade'); $table->string('payslip_number')->unique(); $table->date('pay_period_start'); $table->date('pay_period_end'); $table->date('pay_date'); $table->string('file_path')->nullable(); $table->enum('status', ['generated', 'sent', 'downloaded'])->default('generated'); $table->timestamp('sent_at')->nullable(); $table->timestamp('downloaded_at')->nullable(); $table->foreignId('created_by')->constrained('users')->onDelete('cascade'); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('payslips'); } };