isToday() ? trans('Aujourd\'hui à :time', ['time' => $value->format('H:i')]) : $value->format('Y/m/d à H:i'); } /** * Prepare the given value for storage. * * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceAfterLastUsed * * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceBeforeLastUsed */ public function set(Model $model, string $key, mixed $value, array $attributes): string { // phpcs:enable return Carbon::parse($value)->format('Y-m-d H:i:s'); } }