Example #1
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     $cat = Cat::select('id', 'name', 'parent')->where('id', $id)->orderBy('name')->first();
     $fields = Field::select('id', 'cat_id', 'value', 'trans', 'tag', 'type')->where('cat_id', $cat->id)->get();
     return view('admin.fields.index', compact('cat', 'fields'));
 }