默认情况下,Laravel Eloquent模型假定您的表具有时间戳字段created_at和updated_at,Laravel会尝试自动填写created_at / updated_at
要禁用该自动时间戳,需要在模型中添加一个属性:
class Role extends Model
{
public $timestamps = FALSE;
// ... other model properties and methods
}
默认情况下,Laravel Eloquent模型假定您的表具有时间戳字段created_at和updated_at,Laravel会尝试自动填写created_at / updated_at
要禁用该自动时间戳,需要在模型中添加一个属性:
class Role extends Model
{
public $timestamps = FALSE;
// ... other model properties and methods
}