title: Eloquent Pivot sentence
body: <p>I dont understand well Eloquent pivot sentence
  I have <strong>3 tables</strong>, <em>proyect</em> ( id , name ) , <em>users</em> (id, name)  and <em>proyectUsers</em> (id, user_id, proyect_id)</p>
  
  <p><strong>Proyect model</strong></p>
  
  <pre><code>public function users()
      {
          return $this-&gt;belongsToMany(Users::class, 'projectUsers',  'id_proyect', 'user_id');
      }
  </code></pre>
  
  <p><strong>View</strong> </p>
  
  <pre><code>@foreach( $proyect-&gt;users as $user)
      {{$user-&gt;name}} 
      @if(!$loop-&gt;last)
          ,
      @endif
  @endforeach
  </code></pre>
  
  <p>Actually works, but If I see <a href="https://laravel.com/docs/5.5/eloquent-relationships" rel="nofollow noreferrer">Laravel pivot relation</a> I don't use it any pivot sentence.</p>
  
  <pre><code>foreach ($proyect-&gt;users as $user) {
      echo $user-&gt;pivot-&gt;name;
      @if(!$loop-&gt;last)
          ,
      @endif
  }
  </code></pre>
  
  <p>If I want to do correctly I have to use this code? I do it correctly?</p>