Get the query object to be processed by dataTables.

@return \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder|\Illuminate\Support\Collection
545694
public function query()
    {
        $routes = collect(RouteFacade::getRoutes());

        $routes->transform(function (Route $route, $key) {
            return [
                'domain' => (string) $route->getDomain(),
                'uri' => (string) $route->uri() === '/' ? '/' : '/'.$route->uri(),
                'name' => (string) $route->getName(),
                'methods' => (string) implode(', ', $route->methods()),
                'action' => (string) $route->getActionName(),
                'middleware' => (string) implode(', ', $route->gatherMiddleware()),
            ];
        });

        return $routes;
    }
590312
public static function query()
    {
        $query = new Query(get_called_class());
        $query->set_searchable_fields(static::get_searchable_fields());
        $query->set_primary_key(static::get_primary_key());

        return $query;
    }
230155
public function getAll()
    {
        $model = new static::$model;

        $query = $model::with($model::$localWith);
        $this->qualifyCollectionQuery($query);

        // Handle pagination, if applicable
        $perPage = $model->getPerPage();
        if ($perPage) {
            $paginator = $query->paginate($perPage);

            return $this->response->paginator($paginator, $this->getTransformer());
        } else {
            $resources = $query->get();

            return $this->response->collection($resources, $this->getTransformer());
        }
    }
1293706
public function query()
    {
        $query = app($this->model)->query()->where('resource', $this->resource->getMorphClass());

        return $this->applyScopes($query);
    }
469905
public function getQuery()
    {
        $parameters = clone $this->parameters;
        $query      = $this->em->createQuery($this->getDQL())
            ->setParameters($parameters)
            ->setFirstResult($this->firstResult)
            ->setMaxResults($this->maxResults);

        if ($this->lifetime) {
            $query->setLifetime($this->lifetime);
        }

        if ($this->cacheMode) {
            $query->setCacheMode($this->cacheMode);
        }

        if ($this->cacheable) {
            $query->setCacheable($this->cacheable);
        }

        if ($this->cacheRegion) {
            $query->setCacheRegion($this->cacheRegion);
        }

        return $query;
    }
549338
public function get()
    {
        $query = $this->getCriteria();

        $args = func_get_args();
        if(empty($args)){
            $args = null;
        }

        $isCollection = $this->isCollection($args);

        $response = '';

        try {
            $response = $this->client->request($this, 'get', $args, array(), $query);
        } catch(Exception $ex) {
            $this->dispatchException($ex);
        }

        return $this->transformResponse($response, $isCollection);
    }
335992
public function getQuery() {
		$output	= $this->get('output');
		
		try  {
			$this->set('output', SQLAdapter::SQLQUERY);
			$result = $this->run();
		} catch( \Exception $e ) {
			
		}
		
		$this->set('output', $output);
		
		if( isset($e) ) {
			throw $e;
		}
		
		return $result;
	}
935376
public function query()
    {
        $currentUser = $this->request->user($this->request->route('guard'));

        $query = ! $currentUser->isA('supermanager') ? app($this->model)->query()->whereIn('id', $currentUser->roles->pluck('id')->toArray())
            : app($this->model)->query()->whereIn('id', $currentUser->roles->merge(config('rinvex.tenants.active') ? app('cortex.auth.role')->where('scope', config('rinvex.tenants.active')->getKey())->get() : collect())->pluck('id')->toArray());

        return $this->applyScopes($query);
    }
895342
public function get()
    {
        $hasFrom = ! is_null($this->query->from);

        // When no from has been specified at this point the developer
        // tries to do a basic where query. In this case we want to use the index
        // path, since the index path is supposed to return collections.
        if (! $hasFrom) {
            $path = $this->model->getPath('index');
            $this->query->from($path);
        }

        $models = $this->getModels();

        return $this->model->newCollection($models);
    }
1301597
protected function getQuery() {
        $query = '';

        foreach ($this->config['args'] as $index => $arg) {
            if (array_key_exists('command', $this->config) &&
                $arg === $this->config['command'] &&
                array_key_exists(($index + 1), $this->config['args'])) {
                $query = $this->config['args'][$index + 1];
                break;
            }
        }

        return $query;
    }
1117507
public function query()
    {
        $query = Log::where('description', 'imported')->where('subject_type', $this->resource);

        return $this->applyScopes($query);
    }
551746
public function get()
    {
        // Perform before hook
        $this->beforeGet();

        // Set basic query
        $this->db()->table($this->table)->select($this->columns)->limit($this->limit)->offset($this->offset)->orderBy($this->orderBy);

        // Resolve relationships
        $this->hasOne()->belongsToMany();

        // Get results
        $this->records = $this->db()->get();

        // Add has many relationships
        $this->hasMany();

        // Format relationships
        $this->formatBelongsToMany()->formatHasOne();

        // Perform after hook
        $this->afterGet();

        // Return query results
        return $this->records;
    }
858670
public function getQuery()
    {
        if ($this->query === null) {
            $string = parse_url($this->link, PHP_URL_QUERY);

            parse_str($string, $this->query);
        }

        return $this->query;
    }
54673
public function query()
    {
        $query = DB::table('polls')
            ->join('polls_options', 'polls.id', '=', 'polls_options.poll_id')
            ->join('polls_votes', 'polls_options.id', '=', 'polls_votes.option_id')
            ->select('polls.id', 'polls.question', 'orders.price')
            ->select(DB::raw('polls.id, polls.question, count(*) as votes_count'))
            ->groupBy('polls.id');

        return $query;
    }
971421
protected function _getQuery()
    {
        $oCat = oxNew(\OxidEsales\Eshop\Application\Model\Category::class);
        $oCat->setLanguage(\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('editlanguage'));

        $sCategoriesTable = $oCat->getViewName();

        return " from $sCategoriesTable where " . $oCat->getSqlActiveSnippet();
    }
229260
public function getQuery()
    {
        if (is_null($this->query)) {
            $params = $this->getParameters();
            $params = array_map(array($this, 'htmlDecode'), $params);
            $params = array_map(array($this, 'encode'), $params);

            $this->setQuery(http_build_query($params, "", "&"));
        }

        return $this->query;
    }
342642
public function results()
    {

        if ($this->classname) {
            $orderAdapter = app(\Antares\Datatables\Adapter\OrderAdapter::class);
            $orderAdapter->setClassname($this->classname);
            $orderAdapter->setEngineInstance($this);

            $groupsFilterAdapter = app(\Antares\Datatables\Adapter\GroupsFilterAdapter::class);
            $groupsFilterAdapter->setClassname($this->classname);
            $groupsFilterAdapter->setEngineInstance($this);
        }
        return $this->query->get();
    }