update
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user