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