public function removeRole($user, $role)
    {
        if (is_int($user) and !$user = User::where('id', $user)->first()) {
            return false;
        }
        if (is_int($role) and !$role = Roles::where('id', $role)->first()) {
            return false;
        }
        if (is_string($role) and !$role = Roles::where('name', $role)->first()) {
            return false;
        }
        if (!($user instanceof User) or !($role instanceof Roles)) {
            return false;
        }
        $role->users()->detach($user->id);
        return true;
    }
public function removeRole($user, $role)
    {
        if (is_int($user) and !$user = User::where('id', $user)->first()) {
            return false;
        }
        if (is_int($role) and !$role = Roles::where('id', $role)->first()) {
            return false;
        }
        if (is_string($role) and !$role = Roles::where('name', $role)->first()) {
            return false;
        }
        if (!($user instanceof User) or !($role instanceof Roles)) {
            return false;
        }
        $role->users()->detach($user->id);
        return true;
    }
public function removeRole ( $ user , $ role ) { if ( is_int ( $ user ) and ! $ user = User :: where ( 'id' , $ user ) -> first ( ) ) { return false ; } if ( is_int ( $ role ) and ! $ role = Roles :: where ( 'id' , $ role ) -> first ( ) ) { return false ; } if ( is_string ( $ role ) and ! $ role = Roles :: where ( 'name' , $ role ) -> first ( ) ) { return false ; } if ( ! ( $ user instanceof User ) or ! ( $ role instanceof Roles ) ) { return false ; } $ role -> users ( ) -> detach ( $ user -> id ) ; return true ; }
Remove Role from user

@param int|User         $user User Instance or user id
@param int|string|Roles $role Role Instance, role name, or role id

@return bool
Remove Role from user