Persist route query

@param mixed $eloquent
@param mixed $field
@param mixed $value
@return mixed
485404
public function persist($eloquent, $field, $value, $name)
  {
    return $this->handle($eloquent, $field, $value, $name);
  }
263143
public function resolveField(FieldValue $value): FieldValue
    {
        return $value->setResolver(
            function (Model $parent, array $args, GraphQLContext $context, ResolveInfo $resolveInfo): Deferred {
                $constructorArgs = [
                    'relationName' => $this->directiveArgValue('relation', $this->definitionNode->name->value),
                    'args' => $args,
                    'scopes' => $this->directiveArgValue('scopes', []),
                    'resolveInfo' => $resolveInfo,
                ];

                if ($paginationType = $this->paginationType()) {
                    /** @var int $first */
                    /** @var int $page */
                    [$first, $page] = PaginationUtils::extractArgs($args, $paginationType, $this->paginateMaxCount());

                    $constructorArgs += [
                        'first' => $first,
                        'page' => $page,
                    ];
                }

                return BatchLoader
                    ::instance(
                        RelationBatchLoader::class,
                        $resolveInfo->path,
                        $constructorArgs
                    )
                    ->load(
                        $parent->getKey(),
                        ['parent' => $parent]
                    );
            }
        );
    }
671703
public function getValue($value = '', $field = 'id', $fieldOutput = '')
    {
        if (is_array($value) && count($value) > 0) {
            foreach ($value as $f => $v) {
                if (is_array($v)) {
                    $this->db->where($f, $v, self::OPERATOR_IS_IN);
                } else {
                    $this->db->where($f, $v, self::OPERATOR_EQUAL_TO);
                }
            }
        } else {
            $this->db->where($field, $value, self::OPERATOR_EQUAL_TO);
        }
        $result = $this->db->getOne($this->table, $fieldOutput);
        $this->debug->debug(__FUNCTION__, 'GET Result => ' . json_encode($result));
        if (isset($result->$fieldOutput)) {
            return $result->$fieldOutput;
        } else {
            return NULL;
        }
    }
1165105
public function orWhere($field, $operator = null, $value = null)
    {
        $this->addOrWhere($field, $operator, $value);

        return $this;
    }
217382
public function whereEndsWith($field, $value)
    {
        foreach ($this->queries as $query) {
            $query->whereEndsWith($field, $value);
        }

        return $this;
    }
346017
public function fieldValue($field, $value)
    {
        if (!in_array($field, $this->supports)) {
            $this->supports[ ] = $field;
        }
        $this->values[ $field ] = $value;

        return $this;
    }
664725
public function whereCmp($field, $operator, $value)
    {
        foreach ($this->queries as $query) {
            $query->whereCmp($field, $operator, $value);
        }

        return $this;
    }
172943
public function where($field, $value)
    {
        if (strtolower($field) === "meta_query") {
            return $this->metaWhere($field, $value);
        } elseif (strtolower($field) === "tax_query") {
            return $this->taxWhere($field, $value);
        }

        $this->filters[$field] = $value;
        return $this;
    }
795557
public function where($field, $value)
    {
        $this->reloadQueryAdapter();
        $this->activeQuery->where($field, $value);
        return $this;
    }
1124937
public function orWhere($field, $value)
    {
        $this->reloadQueryAdapter();
        $this->activeQuery->orWhere($field, $value);
        return $this;
    }
1262405
public function by($field, $value)
    {
        $filtered = $this->filter(function($fieldset) use($field, $value) {
            if (isset($fieldset->{$field}) and $fieldset->{$field} == $value) {
                return true;
            }
            return false;
        });
        return $filtered->isEmpty() ? null : ($filtered->count() > 1 ? $filtered : $filtered->first());
    }
162339
public function search($model , $fields , $value = "" , $select = null ,  $orderBy = null , $responseType = true , $limit = 10){
        $this->model = ucfirst($model);
        $this->fields = $fields;
        $this->limit  = $limit;
        $this->value = $value;
        $this->type = $responseType;
        $this->order = $orderBy;
        $this->select = $select;
        return $this->init();
    }
118072
public function whereEq($field, $value)
    {
        foreach ($this->queries as $query) {
            $query->whereEq($field, $value);
        }

        return $this;
    }
12450
public static function eq($field, $value, $dqlAlias = null)
    {
        return new Comparison(Comparison::EQ, $field, $value, $dqlAlias);
    }
534896
private function checkIfValueIsEloquentModel($value)
    {
        if ($value instanceof EloquentModel) {
            foreach ($this->getConfig('routes.model-columns', ['id']) as $column) {
                if (
                    array_key_exists($column, $attributes = $value->getAttributes()) &&
                    ! is_null($attributes[$column])
                ) {
                    return $attributes[$column];
                }
            }
        }

        return $value;
    }
635672
public function findByFieldWithoutFetch($field_name, $value, $operator = '=') {
    $query = $this->db()->createQueryBuilder();
    $query->select('t.*')
      ->from($this->table, 't')
      ->where("$field_name $operator ?")
      ->setParameter(0, $value);

    return $query->execute();
  }
939058
protected function route(Eloquent $entity = null)
    {
        return route('scaffold.action', [
            'module' => app('scaffold.module'),
            'id' => $entity ? $entity->getKey() : null,
            'action' => $this->action($entity),
        ]);
    }