📜  Laravel 雄辩的 upserts - 任何代码示例

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

代码示例1
$flight = Flight::updateOrCreate(
    ['departure' => 'Oakland', 'destination' => 'San Diego'],
    ['price' => 99, 'discounted' => 1]
);