src/Conductors/RemovesRoles.php
protected function retractRoles($roleIds, $authorityClass, $authorityIds)
    {
        $query = $this->newPivotTableQuery();

        $morphType = (new $authorityClass)->getMorphClass();

        foreach ($roleIds as $roleId) {
            foreach ($authorityIds as $authorityId) {
                $query->orWhere($this->getDetachQueryConstraint(
                    $roleId, $authorityId, $morphType
                ));
            }
        }

        $query->delete();
    }
protected function retractRoles($roleIds, $authorityClass, $authorityIds)
    {
        $query = $this->newPivotTableQuery();

        $morphType = (new $authorityClass)->getMorphClass();

        foreach ($roleIds as $roleId) {
            foreach ($authorityIds as $authorityId) {
                $query->orWhere($this->getDetachQueryConstraint(
                    $roleId, $authorityId, $morphType
                ));
            }
        }

        $query->delete();
    }
protected function retractRoles ( $ roleIds , $ authorityClass , $ authorityIds ) { $ query = $ this -> newPivotTableQuery ( ) ; $ morphType = ( new $ authorityClass ) -> getMorphClass ( ) ; foreach ( $ roleIds as $ roleId ) { foreach ( $ authorityIds as $ authorityId ) { $ query -> orWhere ( $ this -> getDetachQueryConstraint ( $ roleId , $ authorityId , $ morphType ) ) ; } } $ query -> delete ( ) ; }
Retract the given roles from the given authorities.

@param  array  $roleIds
@param  string $authorityClass
@param  array $authorityIds
@return void
Retract the given roles from the given authorities .