Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

carbon format date in laravel

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');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #carbon #format #date #laravel
ADD COMMENT
Topic
Name
2+2 =