📜  在 laravel 中手动插入时间戳 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:58.245000             🧑  作者: Mango

代码示例3
// if you would set local timezon otherwise skip this
$timezone = "Asia/Dhaka";
date_default_timezone_set($timezone);
// insert created_at value manually
DB::table('table')->insert([
    'key'=> 'value',
      'created_at' => date("Y-m-d H:i:s", strtotime('now'))
]);