예제 #1
0
 public function index(Manager $fractal, InstypeTransformer $instypeTransformer)
 {
     // show all
     $records = Instype::all();
     $collection = new Collection($records, $instypeTransformer);
     $data = $fractal->createData($collection)->toArray();
     return $this->respond($data);
 }