/**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     return Set::where('id', $id)->with(['squares' => function ($q) {
         $q->where('class', 'invisible')->select('id', 'set_id', 'class');
     }])->first();
 }
예제 #2
0
 /**
  * Display the specified resource.
  * /api/admin/set/{id}/squares
  * @param  int  $id
  * @return Response
  */
 public function squares($id)
 {
     return Set::where('id', $id)->with('squares')->first();
 }