UpdateOrCreate may not update timestamp
When the record is identical, the updated_at timestamp is not changed
Item::updateOrCreate(
['code' => $row[0]],
[
'description'=> $row[1],
'category'=> $row[2],
'uom' => $row[3],
'case_quantity' => $row[4],
'each' => intval(strval($row[5]*100)),
'generic' => false
]); Item::updateOrCreate(
['code' => $row[0]],
[
'description'=> $row[1],
'category'=> $row[2],
'uom' => $row[3],
'case_quantity' => $row[4],
'each' => intval(strval($row[5]*100)),
'generic' => false,
'updated_at' => now(),
]);Last updated