src/Conductors/RemovesRoles.php
protected function getDetachQueryConstraint($roleId, $authorityId, $morphType)
    {
        return function ($query) use ($roleId, $authorityId, $morphType) {
            $query->where(Models::scope()->getAttachAttributes() + [
                'role_id' => $roleId,
                'entity_id' => $authorityId,
                'entity_type' => $morphType,
            ]);
        };
    }
protected function getDetachQueryConstraint($roleId, $authorityId, $morphType)
    {
        return function ($query) use ($roleId, $authorityId, $morphType) {
            $query->where(Models::scope()->getAttachAttributes() + [
                'role_id' => $roleId,
                'entity_id' => $authorityId,
                'entity_type' => $morphType,
            ]);
        };
    }
protected function getDetachQueryConstraint ( $ roleId , $ authorityId , $ morphType ) { return function ( $ query ) use ( $ roleId , $ authorityId , $ morphType ) { $ query -> where ( Models :: scope ( ) -> getAttachAttributes ( ) + [ 'role_id' => $ roleId , 'entity_id' => $ authorityId , 'entity_type' => $ morphType , ] ) ; } ; }
Get a constraint for the detach query for the given parameters.

@param  mixed  $roleId
@param  mixed  $authorityId
@param  string  $morphType
@return \Closure
Get a constraint for the detach query for the given parameters .