-
app/Models/AffiliateUser.php
Open in GitHubclass AffiliateUser extends Model { // ... public function invoices() { return $this->hasManyThrough(Invoice::class, User::class, 'id', 'user_id', 'user_id', 'id'); } // ... }
class AffiliateUser extends Model
{
// ...
public function invoices()
{
return $this->hasManyThrough(Invoice::class, User::class, 'id', 'user_id', 'user_id', 'id');
}
// ...
}