I found the solution
Model Order
protected $dates = ['paid_at'];
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello, I would like to display a date with a specific format, so in my view I have
{!! $order-> created_at->format( 'd.m.Y') !!}
The date is displayed correctly.
But for a second field ($ table->timestamp( 'paid_at')) it does work and the code is similar :
{!! $order-> paid_at->format( 'd.m.Y')} !!}
I have this error :
Call to a member function format() on a non-object
Why ? And how can I fix it?
I found the solution
Model Order
protected $dates = ['paid_at'];
Please or to participate in this conversation.