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:
@@ -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',
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user