mirror of
https://github.com/crater-invoice/crater.git
synced 2025-12-16 18:32:55 -05:00
fix parse condition
This commit is contained in:
@@ -57,14 +57,14 @@ class Estimate extends Model implements HasMedia
|
||||
public function setEstimateDateAttribute($value)
|
||||
{
|
||||
if ($value) {
|
||||
$this->attributes['estimate_date'] = Carbon::createFromFormat('Y-m-d', $value);
|
||||
$this->attributes['estimate_date'] = Carbon::parse($value)->format('Y-m-d');
|
||||
}
|
||||
}
|
||||
|
||||
public function setExpiryDateAttribute($value)
|
||||
{
|
||||
if ($value) {
|
||||
$this->attributes['expiry_date'] = Carbon::createFromFormat('Y-m-d', $value);
|
||||
$this->attributes['expiry_date'] = Carbon::parse($value)->format('Y-m-d');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user