title: Must be an instance of App, Relation, instance of Illuminate BelongsToMany returned
body: <p>I've got one error when trying to attach a program in Laravel with belongsToMany Relationship. Someone that knows what I'm doing wrong?</p>
  
  <p>Controller</p>
  
  <pre class="lang-php prettyprint-override"><code>$user = User::where('id', $request-&gt;input('user_id'))-&gt;first();
  $program = Program::where('id', $request-&gt;input('program_id'))-&gt;first();
  $update = $user-&gt;programs()-&gt;attach($program);
  </code></pre>
  
  <p>Relationship</p>
  
  <pre class="lang-php prettyprint-override"><code>public function programs() : Relation
  {
      return $this-&gt;belongsToMany(\App\Program::class, 'program_user');
  }
  </code></pre>
  
  <p>I've got this error --> "Return value of App\User::programs() must be an instance of App\Relation, instance of Illuminate\Database\Eloquent\Relations\BelongsToMany returned"</p>