title: Using accessors with pivot table fields in Eloquent
body: <p>I've currently got a few models that have many to many relationships via laravel. here's the structure:</p>
  
  <pre><code>users
      id
      username
      ...
  
  games
      id
      title
      ...
  
  game_user
      game_id
      user_id
      system
  </code></pre>
  
  <p>Now, my models look a little like this:</p>
  
  <pre><code>&lt;?php
  
  class Game extends Eloquent
  {
      /**
       * A game is owned by many users
       *
       * @return mixed
       */
      public function user()
      {
          return $this-&gt;belongsToMany('User')-&gt;withPivot('system');
      }
  
  
  &lt;?php
  
  class User extends Eloquent
  {
      /**
       * A user has many games.
       *
       * @return mixed
       */
      public function games()
      {
          return $this-&gt;belongsToMany('Game')-&gt;withPivot('system');
      }
  </code></pre>
  
  <p>Now, this all works fine. However, I wish to use a mutator upon the system field from the pivot table. I can't find any documentation on this and the following (in both the User and Game models) does not work:</p>
  
  <pre><code>public function getSystemAttribute($val)
  {
      return $val.' Testing';
  }
  </code></pre>