I am getting a date as a string from an Ajax call: "Wed Jun 17 2020 09:26:45 GMT+0200 (Mitteleurop\u00e4ische Sommerzeit)" and tried to format it in "Y-m-d H:i:s" but failed. I tried
$my = $request->input('date');
$date = Carbon::parse($my);
$date = date("Y-m-d H:i:s", strtotime($my));
$date = Carbon::createFromFormat('Y-m-d H:i:s', $my);
$date = Carbon::create(my);
but nothing worked. Carbon works and $request->input('date') exists. What is the issue here?