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