src/Executors/RefConsistExecutor.php
public function exist(ARef $ref)
    {
        $type = $ref->getType();
        $type_name = $type->getName();

        $id = $ref->getId();

        $type_rank = $type->getRank();

        if($type_rank === TypeRank::BLOCK)
        {
            $collection = Block::where('name', $type_name)->get();
        }
        elseif($type_rank === TypeRank::GROUP)
        {
            $collection = Group::where('name', $type_name)->where('id', $id)->get();
        }
        else
        {
            throw new QSException('Не корректный ранг типа '.$type_name.' ссылки!');
        }

        return !$collection->isEmpty();
    }
public function exist(ARef $ref)
    {
        $type = $ref->getType();
        $type_name = $type->getName();

        $id = $ref->getId();

        $type_rank = $type->getRank();

        if($type_rank === TypeRank::BLOCK)
        {
            $collection = Block::where('name', $type_name)->get();
        }
        elseif($type_rank === TypeRank::GROUP)
        {
            $collection = Group::where('name', $type_name)->where('id', $id)->get();
        }
        else
        {
            throw new QSException('Не корректный ранг типа '.$type_name.' ссылки!');
        }

        return !$collection->isEmpty();
    }
@param \Interpro\Core\Contracts\Ref\ARef $ref

@return bool