title: Laravel BelongsToMany method returns nothing
body: <p>I am implementing a many-to-many relationship in Laravel.
  The entities are:
  <code>users</code>
  <code>roles</code>
  and pivot table <code>user_role</code></p>
  
  <pre><code>Users
  ====
  id
  name
  .....
  
  roles
  ====
  id
  role
  ...
  
     user_role
     ======
     userId
     roleId
  </code></pre>
  
  <p>Trying various ways to get the <code>roles</code> of a <code>user</code> but no luck so far. Any ideas?</p>
  
  <p>Last try is: </p>
  
  <pre><code>/**
       * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
       */
      public function roles()
      {
          return $this-&gt;belongsToMany(Role::class, 'user_role', 'userId', 'roleId');
      }
  </code></pre>
  
  <p>Current output on Laravel Tinker:</p>
  
  <pre><code>&gt;&gt;&gt; $user-&gt;roles()
  =&gt; Illuminate\Database\Eloquent\Relations\BelongsToMany {#2380
       +withTimestamps: false,
  </code></pre>