1 year ago

Why carbon format not working?

Posted 1 year ago by RidwanIslam

I want to change format of created_at column. Normally it show 2018-10-03 04:38:58. Now I want to show d-m-Y format but it's not working.

Here is my code-

$user = User::find(1);

return \Carbon\Carbon::parse($user->created_at)->format('d-m-Y');

Any suggestion?

Please sign in or create an account to participate in this conversation.