Date de carbone du format
Carbon::createFromFormat('Y-m-d H:i:s', $request->date)->format('d-m-Y')
tsnl_incredible
Carbon::createFromFormat('Y-m-d H:i:s', $request->date)->format('d-m-Y')
$comment->created_at->diffForHumans();
<?php
use Carbon\Carbon;
use Illuminate\Support\Carbon;
$current = Carbon::now()->format('YmdHms'); //it will give current date and time
$formateddate = Carbon::parse($date)->format('M d Y');
1. First parse the created_at field as Carbon object.
$createdAt = Carbon::parse($item['created_at']);
2.Then you can use
$suborder['payment_date'] = $createdAt->format('M d Y');