public function roles() { return $this->belongsToMany(static::$rolesModel, 'role_users', 'user_id', 'role_id')->withTimestamps(); }
public function testRolesRelationship() { $user = new EloquentUser(); $this->assertInstanceOf('Illuminate\\Database\\Eloquent\\Relations\\BelongsToMany', $user->roles()); }