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