src/Controllers/ResourceController.php
public function getModels($queryBuilder, Context $context, $resourceDefinition = null, $records = null)
    {
        $resourceDefinition = $resourceDefinition ?? $this->resourceDefinition;
        $records = $records ?? $this->getRecordLimit();

        return $this->filterAndGet($queryBuilder, $resourceDefinition, $context, $records);
    }
public function getModels($queryBuilder, Context $context, $resourceDefinition = null, $records = null)
    {
        $resourceDefinition = $resourceDefinition ?? $this->resourceDefinition;
        $records = $records ?? $this->getRecordLimit();

        return $this->filterAndGet($queryBuilder, $resourceDefinition, $context, $records);
    }
From a query builder, filter models based on input and processor and return the resulting
models.
Since order is important, the returned Collection will be a plain laravel collection!
@param $queryBuilder
@param Context $context
@param ResourceDefinition|string|null $resourceDefinition
@param int|null $records
@return Model[]