title: Eloquent query with two models
body: <p>I need your help, please!
  I have two models <code>customer</code> and <code>membership</code>. Customer <code>hasMany</code> Memberships.
  I need to extract all customers with a membership <code>active</code>. I did this but it extracts only memberships, without customers data. How can I change it to solve the problem?</p>
  
  <pre><code>Membership::has("customer")
      -&gt;forCompany($companyId)
      -&gt;whereIn('state', ['ATTIVA', 'IN ATTESA DI ESITO', 'DA INVIARE'])
      -&gt;where(function ($query) {
          $query
              -&gt;where('end_date', '&gt;=', Carbon::now()-&gt;toDateString())
              -&gt;orWhereNull('end_date');
      })
  </code></pre>