title: Laravel extending App\User and call with \Auth::user()->mymethod()
body: <p>In my project I use the default App\User.php model like this:</p>
  
  <pre><code>namespace App;
  
  class User extends Authenticatable
  {
      public function comments()
      {
          return $this-&gt;hasMany('App\Comment', 'user_id', 'id');
      }
  }
  </code></pre>
  
  <p>I have created a package "shop" and want to extend the User model.
  For example:</p>
  
  <pre><code>namespace Pixiebox\Shop;
  
  use Illuminate\Database\Eloquent\Model;
  
  class Cart extends Authenticatable
  {
      public function posts()
      {
          return $this-&gt;belongsToMany('App\Post', 'cart_posts', 'cart_id', 'post_id')-&gt;withPivot(['listtype', 'qty']);
      }
  }
  </code></pre>
  
  <p>Pixiebox\Shop\src\Shop\User.php</p>
  
  <pre><code>namespace Pixiebox\Shop;
  
  use Illuminate\Foundation\Auth\User as Authenticatable;
  
  class User extends Authenticatable
  {
      public function cart()
      {
          return $this-&gt;hasOne('Pixiebox\Shop\Cart', 'user_id', 'id');
      }
  }
  </code></pre>
  
  <p>If I do </p>
  
  <pre><code>$wishlist = \Auth::user()-&gt;cart()-&gt;with(['posts' =&gt; function($subquery){
      return $subquery-&gt;wherePivot('listtype', 'wishlist');
  }])-&gt;first();
  </code></pre>
  
  <p>it returns "Call to undefined method App\User::cart()".
  Because it's an optional package I don't want to put the methods in \App\User.php but in the package where it belongs. Is there another way around?</p>