How format date Carbon:now() in Laravel PHP

ThaiVD picture ThaiVD · Jul 6, 2018 · Viewed 31.8k times · Source

I tried

 update(['access' => Carbon::now()->format('Y/m/d H:i:s')]);

it returned Y-m-d H:i:s

Answer

JOY KUMAR PAL picture JOY KUMAR PAL · Jun 29, 2020

now()->format('Y-m-d H:i:s')

You Can Format like above code simply.