tanggal karbon dari 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')
<?php
use Carbon\Carbon;
$date = \Carbon\Carbon::createFromFormat('Y-m-d H:i:s',$calc[0]['created_at']);
$date->setTimezone('Asia/Karachi');
$date->format('d M, Y H:i A')
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');
Carbon::now()->toISOString()