SELECT * FROM users as u left JOIN clients2adverts as c on u.id = c.id_client
left JOIN adverts as a ON c.id_adverts = a.id_realty
WHERE c.lead = 1 and u.activated = 1 or u.id_role = 2
public function user()
{
return $this->belongsTo('App\User', 'foreign_key', 'other_key');
}