title: Laravel 8 Eloquent upsert inserting new records
body: <p>I am trying to understand Laravel 8's new feature <code>upsert</code>.</p>
  <p>Here is my sample table:</p>
  <pre><code>flights
  id (primary key and auto Inc)
  departure
  destination
  price
  </code></pre>
  <p>In my code:</p>
  <pre><code>App\Models\Flight::upsert([
      ['departure' =&gt; 'Oakland', 'destination' =&gt; 'San Diego', 'price' =&gt; 99],
      ['departure' =&gt; 'Chicago', 'destination' =&gt; 'New York', 'price' =&gt; 150]
  ], ['departure', 'destination']);
  </code></pre>
  <p>This is the sample table from Laravel documentation and it has one key id.</p>
  <p>I want to update the record if both <code>departure</code> and <code>destination</code> are matched but these fields are not unique.</p>
  <p>Every time I run the code, it inserts a new record but does not update. How to get <code>upsert</code> working?</p>
  <p>Do I need to make both <code>departure</code> and <code>destination</code> unique or will it work without making them unique?</p>
  <p>Also if I need to make both fields unique then how can I do it in migration?</p>