src/Traits/LaratrustUserTrait.php
public function syncRoles($roles = [], $team = null, $detaching = true)
    {
        return $this->syncModels('roles', $roles, $team, $detaching);
    }
public function syncRoles($roles = [], $team = null, $detaching = true)
    {
        return $this->syncModels('roles', $roles, $team, $detaching);
    }
public function syncRoles ( $ roles = [ ] , $ team = null , $ detaching = true ) { return $ this -> syncModels ( 'roles' , $ roles , $ team , $ detaching ) ; }
Sync roles to the user.

@param  array  $roles
@param  mixed  $team
@param  boolean  $detaching
@return static
Sync roles to the user .