Skip to content

A free open source IT asset/license management system

Change cast to include format

snipe9fc1cbd7aec9
diff --git a/app/Models/License.php b/app/Models/License.php
index 44f1f45b70..ba00b7d0d4 100755
--- a/app/Models/License.php
+++ b/app/Models/License.php
@@ -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',
];