Skip to content

Commit

Permalink
Fixed grammar (laravel#6768)
Browse files Browse the repository at this point in the history
  • Loading branch information
troccoli authored Jan 23, 2021
1 parent d7d8d5b commit a5fbe86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eloquent.md
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ If you would like to make all of your attributes mass assignable, you may define

Occasionally, you may need to update an existing model or create a new model if no matching model exists. Like the `firstOrCreate` method, the `updateOrCreate` method persists the model, so there's no need to manually call the `save` method.

In the example below, if a flight exists with a `departure` location of `Oakland` and a `destination` location of `San Diego`, it's `price` and `discounted` columns will be updated. If no such flight exists, a new flight will be created which has the attributes resulting from merging the first argument array with the second argument array:
In the example below, if a flight exists with a `departure` location of `Oakland` and a `destination` location of `San Diego`, its `price` and `discounted` columns will be updated. If no such flight exists, a new flight will be created which has the attributes resulting from merging the first argument array with the second argument array:

$flight = Flight::updateOrCreate(
['departure' => 'Oakland', 'destination' => 'San Diego'],
Expand Down

0 comments on commit a5fbe86

Please sign in to comment.