📜  关于更新当前时间戳 laravel 迁移 - PHP 代码示例

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

代码示例2
$table->timestamp('created_at')->default(DB::raw('CURRENT_TIMESTAMP'));
$table->timestamp('updated_at')->default(DB::raw('CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'));