I'm trying to get the date from a timestamp field in my database, i'm using a timestamp because with date Carbon doesn't add the hours/minutes/seconds in my date, and I need them.
When I try to get the date it works but return a string, and I can't use the Carbon methods with this string, what can I do ? I don't know why it's a string.
Here is what I try to do :
@foreach($disponibilites as $comp)
<span class="badge badge-pill indigo">{{ $comp->date_debut->diffForHuman() }}</span>
@endforeach
Carbon::now()->toDateString()produces a full datetime string (2018-06-23 10:30:18), and there are billions of formats to choose from, andCarbon::now()->addHours(2)or whatever will do just what you suggest it doesn't