best way change date formate in laravel code example
Example 1: date format change in laravel blade
{{date_format($data->con_date_maintained,'D M Y')}}
{{ $data->con_wash_start_date == null ? date_format($data->con_date_maintained,'D M Y') : "-" }}
Example 2: date format change in laravel
$editData->hld_end_date ? date('d-m-Y',strtotime($editData->hld_end_date)) : null
date('d-m-Y',strtotime(str_replace('/', '-', $editData->hld_end_date)
date_format(date_create($editData->hld_end_date),'d-m-Y')
$editData->hld_end_date->format('d-m-Y')
\Carbon\Carbon::parse($editData->hld_end_date)->format('d/m/Y')