Answer the question
In order to leave comments, you need to log in
Why does Carbon return the current time if it is NULL in the database?
I get the publication time:
{{ \Carbon\Carbon::parse($blog->published_at)->format('d.m.Y H:i')}}
parse
use another method instead?
Answer the question
In order to leave comments, you need to log in
Maybe the time() function is used which, without parameters, displays the current time. Or another function with similar behavior.
Wrap in a condition what to display, only if the date value is not null.
Or go to the carbon class and see how it is implemented there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question