Add purchase date to dates array so it’s treated as a Carbon date

This commit is contained in:
snipe 2017-11-09 18:59:05 -08:00
parent 65bd33c274
commit bb4d49690f
3 changed files with 4 additions and 3 deletions

View file

@ -17,7 +17,7 @@ class Accessory extends SnipeModel
use Loggable, Presentable;
use SoftDeletes;
protected $dates = ['deleted_at'];
protected $dates = ['deleted_at', 'purchase_date'];
protected $table = 'accessories';
protected $casts = [
'requestable' => 'boolean'

View file

@ -17,7 +17,7 @@ class Component extends SnipeModel
use Loggable, Presentable;
use SoftDeletes;
protected $dates = ['deleted_at'];
protected $dates = ['deleted_at', 'purchase_date'];
protected $table = 'components';
/**
* Category validation rules

View file

@ -12,13 +12,14 @@ class Consumable extends SnipeModel
use Loggable, Presentable;
use SoftDeletes;
protected $dates = ['deleted_at'];
protected $dates = ['deleted_at', 'purchase_date'];
protected $table = 'consumables';
protected $casts = [
'requestable' => 'boolean'
];
/**
* Category validation rules
*/