Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Laravel eloquent upserts

$flight = Flight::updateOrCreate(
    ['departure' => 'Oakland', 'destination' => 'San Diego'],
    ['price' => 99, 'discounted' => 1]
);
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #Laravel #eloquent #upserts
ADD COMMENT
Topic
Name
4+2 =