Laravel eloquent upserts

40

Laravel eloquent upserts -

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

Comments

Submit
0 Comments