title: Laravel comparing Query result with variable
body: <p>I have these two variables</p>
  <pre><code>$categories = Relation::select('child_id', 'distance')
  -&gt;where('parent_id', $request-&gt;who)
  -&gt;orderBy('distance', 'asc')
  -&gt;get();
  
  $request-&gt;newParent; 
  </code></pre>
  <p><em>Is there any way to check if my query <code>result($categories)</code> contains id same as <code>$request-&gt;newParent</code> without making another database query.</em></p>