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