/** * Compile this item into an Array using Fractal's Transformers * * @param ParamBag $params * @return array */ public function execute(ParamsBag $params) { return $this->includeRelated($params->getIncludes())->compileFractalData(); }
/** * Compile this query into an Array using Fractal's Transformers * * @param ParamBag $params * @return array */ public function execute(ParamsBag $params) { return $this->search($params->getSearchQuery())->orderBy($params->getSortColumn(), $params->getSortDirection())->paginate($params->getPerPage(), $params->getPage())->includeRelated($params->getIncludes())->compileFractalData(); }