public function index(Manager $fractal, DistributorTransformer $distributorTransformer) { // show all $records = Distributor::all(); $collection = new Collection($records, $distributorTransformer); $data = $fractal->createData($collection)->toArray(); return $this->respond($data); }