laravel time format in blade file code example

Example 1: format time laravel

{{\Carbon\Carbon::createFromFormat('H:i:s',$time)->format('h:i')}}

{{$item->date_seance->format('d/m/Y') }}

{{date('H:i', strtotime($item->start_time)) }}

Example 2: 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') : "-" }}
//$uj@y

Example 3: blade format date

{!! htmlspecialchars_decode(date('j<\s\up>S</\s\up> F Y', strtotime('21-05-2020'))) !!}

Tags:

Php Example