title: Laravel - function where() after the model has already been retrieved
body: <p>Can I use the function where() or some equivalent after the model has already been retrieved?
  For example:</p>
  
  <pre><code>    $head = Equipment::where('user_id', $fighter-&gt;id)-&gt;where('lvl_after_reduction', '&lt;=', $fighter-&gt;attributes-&gt;lvl)-&gt;where('durability', '&gt;', 0)
                        -&gt;whereHas('item', function ($q) {
                            $q-&gt;where('type_id', 1);
                        })-&gt;where('wear', 1)-&gt;first();
  
      $torso = Equipment::where('user_id', $fighter-&gt;id)-&gt;where('lvl_after_reduction', '&lt;=', $fighter-&gt;attributes-&gt;lvl)-&gt;where('durability', '&gt;', 0)-&gt;whereHas('item', function ($q) {
          $q-&gt;where('type_id', 2);
      })-&gt;where('wear', 1)-&gt;first();
  
      if ($torso == null)
          $torso = Equipment::where('user_id', $fighter-&gt;id)-&gt;where('lvl_after_reduction', '&lt;=', $fighter-&gt;attributes-&gt;lvl)-&gt;where('durability', '&gt;', 0)-&gt;whereHas('item', function ($q) {
              $q-&gt;where('type_id', 3);
          })-&gt;where('wear', 1)-&gt;first();
  
      $hands = Equipment::where('user_id', $fighter-&gt;id)-&gt;where('lvl_after_reduction', '&lt;=', $fighter-&gt;attributes-&gt;lvl)-&gt;where('durability', '&gt;', 0)-&gt;whereHas('item', function ($q) {
          $q-&gt;where('type_id', 4);
      })-&gt;where('wear', 1)-&gt;first();
  
      $waist = Equipment::where('user_id', $fighter-&gt;id)-&gt;where('lvl_after_reduction', '&lt;=', $fighter-&gt;attributes-&gt;lvl)-&gt;where('durability', '&gt;', 0)-&gt;whereHas('item', function ($q) {
          $q-&gt;where('type_id', 5);
      })-&gt;where('wear', 1)-&gt;first();
  
      $feet = Equipment::where('user_id', $fighter-&gt;id)-&gt;where('lvl_after_reduction', '&lt;=', $fighter-&gt;attributes-&gt;lvl)-&gt;where('durability', '&gt;', 0)-&gt;whereHas('item', function ($q) {
          $q-&gt;where('type_id', 6);
      })-&gt;where('wear', 1)-&gt;first();
  
      $amulet = Equipment::where('user_id', $fighter-&gt;id)-&gt;where('lvl_after_reduction', '&lt;=', $fighter-&gt;attributes-&gt;lvl)-&gt;where('durability', '&gt;', 0)-&gt;whereHas('item', function ($q) {
          $q-&gt;where('type_id', 8);
      })-&gt;where('wear', 1)-&gt;first();
  
      $first_ring = Equipment::where('user_id', $fighter-&gt;id)-&gt;where('lvl_after_reduction', '&lt;=', $fighter-&gt;attributes-&gt;lvl)-&gt;where('durability', '&gt;', 0)-&gt;whereHas('item', function ($q) {
          $q-&gt;where('type_id', 9);
      })-&gt;where('wear', 1)-&gt;first();
  
      $secound_ring = Equipment::where('user_id', $fighter-&gt;id)-&gt;where('lvl_after_reduction', '&lt;=', $fighter-&gt;attributes-&gt;lvl)-&gt;where('durability', '&gt;', 0)-&gt;whereHas('item', function ($q) {
          $q-&gt;where('type_id', 9);
      })-&gt;where('wear', 2)-&gt;first();
  
      $right_hand = Equipment::where('user_id', $fighter-&gt;id)-&gt;where('lvl_after_reduction', '&lt;=', $fighter-&gt;attributes-&gt;lvl)-&gt;where('durability', '&gt;', 0)-&gt;whereHas('item', function ($q) {
          $q-&gt;whereIn('type_id', [10, 11]);
      })-&gt;where('wear', 1)-&gt;first();
  </code></pre>
  
  <p>Can I combine these queries into one? Because I have a lot of queries to database per page. </p>
  
  <p>Sorry for my english.</p>