isToday() ? trans('Aujourd\'hui à :time', [ 'time' => $value->isoFormat('HH:mm') ]) : $value->isoFormat('YYYY/MM/DD HH:mm'); } /** * Parse a date string to a date time date. * * @param Model $model * @param string $key * @param mixed $value * @param array $attributes * @return string * @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing * @phpcs:disable Squiz.Commenting.FunctionComment.ScalarTypeHintMissing */ public function set($model, $key, $value, $attributes) { return Carbon::parse($value)->isoFormat('YYYY/MM/DD HH:mm'); } }