title: How to get an object using the ID of another object?
body: <p>I want to get the <code>$congress</code> object using the ticket type <em>id</em>, so is possible to use <code>$congress-&gt;participants()-&gt;count</code>. But like this:</p>
  
  <pre><code>  $congress = TicketType::where('id', $id)-&gt;pluck('congress_id')-&gt;first();
    $registrationsCount = $congress-&gt;participants()-&gt;count();
  </code></pre>
  
  <p>It shows "Call to a member function participants() on integer
  ". Do you know why?</p>