Laravel eloquent upserts

42

Laravel eloquent upserts -

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

Comments

Submit
0 Comments