roles() public method

Returns the roles relationship.
public roles ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany
return Illuminate\Database\Eloquent\Relations\BelongsToMany
Exemplo n.º 1
0
 public function testRolesRelationship()
 {
     $user = new EloquentUser();
     $this->assertInstanceOf('Illuminate\\Database\\Eloquent\\Relations\\BelongsToMany', $user->roles());
 }