This commit is contained in:
baodev0
2026-10-05 09:30:24 +07:00
parent a1aeb88061
commit 1544629a1f
53 changed files with 1292 additions and 963 deletions
+7
View File
@@ -23,6 +23,13 @@ class Invoice extends Model
'auto_renew' => 'boolean',
];
protected static function booted(): void
{
static::creating(function (Invoice $invoice) {
$invoice->date ??= now()->toDateString();
});
}
public function customer()
{
return $this->belongsTo(Customer::class);