Used the getFormattedDateObject() function with the expected parameters

This commit is contained in:
Ivan Nieto Vivanco 2022-06-20 19:58:51 -05:00
parent cabef8ff12
commit 3a5c09c424

View file

@ -100,7 +100,7 @@ class AssetsTransformer
if ($field->format == 'DATE'){
if (Gate::allows('superadmin')){
$value = Helper::getFormattedDateObject($value)['formatted'];
$value = Helper::getFormattedDateObject($value, 'date', false);
} else {
$value = strtoupper(trans('admin/custom_fields/general.encrypted'));
}
@ -117,7 +117,7 @@ class AssetsTransformer
$value = $asset->{$field->convertUnicodeDbSlug()};
if (($field->format == 'DATE') && (!is_null($value)) && ($value!='')){
$value = Helper::getFormattedDateObject($value)['formatted'];
$value = Helper::getFormattedDateObject($value, 'date', false);
}
$fields_array[$field->name] = [