how to convert timestamp to date in php laravel code example
Example 1: laravel convert timestamp to date
laravel convert timestamp to date
date('Y-m-d', strtotime($date));
laravel convert date to timestamp
date('Y-m-d H:i:s', strtotime($date));
Example 2: convert date to timestamp in laravel builder
$date = '2021-05-20';
date('Y-m-d H:i:s', strtotime($date));