Date/Timestamp Formating Directly In Laravel Blade Templates

  • Created: 12-05-2019
  • Posted By: Safina

The laravel default timestamps are formatted as Y-m-d H:i:s. To customize the timestamp to suit your application the native PHP function date_format() as below:

{{date_format($item->created_at,D, d-M-Y)}} will yield the format as Sun, 28-Oct-2018.

This code can be placed directly in the blade templates.


Post Comments