currently i am using
Carbon::now()
it displays
2015-03-10 23:23:46
but i only need
This solution will work for you.
<td>
{{$message->created_at->todatestring()}}
</td>
http://carbon.nesbot.com/docs/#api-formatting
$dt = Carbon::now();
echo $dt->toDateString(); // Equivalent: echo $dt->format('Y-m-d');
Or you can use this,
echo Carbon::createFromFormat('Y-m-d H', '1975-05-21 22')->toDateTimeString();
// 1975-05-21 22:00:00
Example,
{{ $post->created_at->toDayDateTimeString()}}
Carbon Docs Source Link
Get Today's Date in Y-m-d formta as given below,
$dt = Carbon::today()->toDateString(); // Use today to display only date
if you have used $dt = Carbon::today()
only, it will return the timestamp also.
This is correctly:
$date = Carbon::now();
echo $date->format('Y-m-d');
Simply use this
Carbon::today()->toDateString()