Extending the out of the box User model in Laravel
<p>First off -- forgive the ignorance, I'm new to Laravel. :)</p>

<p>I'm playing around in Laravel and am running into an issue when extending the out of the box <code>User</code> model. I'd like to implement a basic concept of roles that should be simply represented as a property of the <code>User</code>.</p>

<p>I've created the default User model and authentication:</p>

<blockquote>
  <p>artisan make:auth</p>
</blockquote>

<p>From there, that produced:</p>

<pre><code>namespace App;

use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable
{
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'name', 'email', 'password',
    ];

    /**
     * The attributes excluded from the model's JSON form.
     *
     * @var array
     */
    protected $hidden = [
        'password', 'remember_token',
    ];  
}
</code></pre>

<p>I've also created a UseRoles model and attempted to create the relationship between the two:</p>

<pre><code>namespace App;

use Illuminate\Database\Eloquent\Model;

class UserRoles extends Model
{
    protected $table = 'user_roles';

    public function User()
    {
        $this-&gt;belongsTo('App\User', 'user_id', 'id');
    }
}
</code></pre>

<p>And over in the <code>User</code> model I added:</p>

<pre><code>public function Roles()
{
    $this-&gt;hasMany('App\UserRoles', 'user_id', 'id');
}
</code></pre>

<p>Lastly, I ran the migration scripts and started the server, hit localhost and logged in using the default bootstrapped auth.</p>

<p>What I expect to see is a collection of Roles off of the User model, but I do not. A print_r shows the default user model with no additional properties.</p>

<p>Is there something obvious that I'm overlooking?</p>

<p>Thank you,</p>