title: Laravel PHP - Have the the set option in db to be the selected in select list
body: <p>I select two records from the database:</p>
  
  <pre><code>    return view('customers')-&gt;with(
          [
              "customers" =&gt; DB::table('people')
                  -&gt;leftJoin("statuses", "people.status", "=", "statuses.id")
                  -&gt;where('type', 'customer')
                  -&gt;get()-&gt;toArray(),
              "statuses"  =&gt; DB::table("statuses")-&gt;get()-&gt;toArray()
          ]);
  </code></pre>
  
  <p>Each <code>customer</code> has a <code>status</code> column that represents a <code>statuses.id</code>.</p>
  
  <p>Now in my view:</p>
  
  <pre><code>                            @foreach ($customers as $customer)
                                  &lt;tr&gt;
                                      &lt;td&gt;{{$customer-&gt;id}}&lt;/td&gt;
                                      &lt;td&gt;{{$customer-&gt;first_name}} {{$customer-&gt;last_name}}&lt;/td&gt;
                                      &lt;td&gt;{{$customer-&gt;country_id}}&lt;/td&gt;
                                      &lt;td&gt;{{$customer-&gt;phone_number}}&lt;/td&gt;
                                      &lt;td&gt;{{$customer-&gt;created_at}}&lt;/td&gt;
                                      &lt;td&gt;{{$customer-&gt;email}}&lt;/td&gt;
                                      &lt;td&gt;{{$customer-&gt;campaign}}&lt;/td&gt;
                                      &lt;td&gt;
                                          &lt;select&gt;
                                              @foreach($statuses as $status)
                                                  &lt;option&gt;{{$status-&gt;title}}&lt;/option&gt;
                                              @endforeach
                                          &lt;/select&gt;
                                      &lt;/td&gt;
                                      &lt;td&gt;
                                      &lt;/td&gt;
                                  &lt;/tr&gt;
                              @endforeach
  </code></pre>
  
  <p>I print all of the statuses, but I want to set the selected status to be the ID that I joined with <code>people</code></p>
  
  <p>What is the best practice to do so?</p>