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