src/Defender/Traits/Users/HasRoles.php
public function attachRole($role)
    {
        if (! $this->hasRole($role->name)) {
            $this->roles()->attach($role);
        }
    }
public function attachRole($role)
    {
        if (! $this->hasRole($role->name)) {
            $this->roles()->attach($role);
        }
    }
public function attachRole ( $ role ) { if ( ! $ this -> hasRole ( $ role -> name ) ) { $ this -> roles ( ) -> attach ( $ role ) ; } }
Attach the given role.

@param \Artesaos\Defender\Role $role
Attach the given role .