Level 67
date needs to be a carbon instance for that. There's an easy way to set that: https://laravel.com/docs/5.8/eloquent-mutators#date-mutators
alternatively
{{ Carbon\Carbon::parse($po->date)->format('m/d/Y') }}
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
{{$po->date}}
works fine but
{{$po->date->format('m/d/Y')}}
Gives this error
Call to a member function format() on string
date needs to be a carbon instance for that. There's an easy way to set that: https://laravel.com/docs/5.8/eloquent-mutators#date-mutators
alternatively
{{ Carbon\Carbon::parse($po->date)->format('m/d/Y') }}
Please or to participate in this conversation.