Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel documentation updateOrCreate

Flight::upsert([
    ['departure' => 'Oakland', 'destination' => 'San Diego', 'price' => 99],
    ['departure' => 'Chicago', 'destination' => 'New York', 'price' => 150]
], ['departure', 'destination'], ['price']);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #documentation #updateOrCreate
ADD COMMENT
Topic
Name
9+2 =