Change cast to include format

https://laravel.com/docs/8.x/eloquent-mutators#date-casting - this doesn’t seem to work tho?
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-10-31 12:24:48 +00:00
parent e405e27643
commit 9fc1cbd7ae

View file

@ -32,10 +32,11 @@ class License extends Depreciable
protected $guarded = 'id';
protected $table = 'licenses';
protected $casts = [
'purchase_date' => 'date',
'expiration_date' => 'date',
'termination_date' => 'date',
'purchase_date' => 'date:Y-m-d',
'expiration_date' => 'date:Y-m-d',
'termination_date' => 'date:Y-m-d',
'category_id' => 'integer',
'company_id' => 'integer',
];