app/Http/Traits/HasRoles.php
/**
     * Revoke the given role from the model.
     */
Revoke the given role from the model.
Revoke the given role from the model .
public function removeRole($role) {
        if (is_string($role)) {
            $role = Role::findByName($role);
        }
        if ($role instanceof Role)
            $this->roles()->detach($role);
        else
            throw new \InvalidArgumentException('Invalid role instance detected.');
    }
public function removeRole ( $ role ) { if ( is_string ( $ role ) ) { $ role = Role :: findByName ( $ role ) ; } if ( $ role instanceof Role ) $ this -> roles ( ) -> detach ( $ role ) ; else throw new \ InvalidArgumentException ( 'Invalid role instance detected.' ) ; }
Revoke the given role from the model.
Revoke the given role from the model .