public function setRoles(Collection $roles)
    {
        $this->roles->clear();
        foreach ($roles as $role) {
            $this->roles[] = $role;
        }
    }
public function setRoles(Collection $roles)
    {
        $this->roles->clear();
        foreach ($roles as $role) {
            $this->roles[] = $role;
        }
    }
public function setRoles ( Collection $ roles ) { $ this -> roles -> clear ( ) ; foreach ( $ roles as $ role ) { $ this -> roles [ ] = $ role ; } }
Set the list of roles.

@param Collection $roles
Set the list of roles .