Exemplo n.º 1
0
 /**
  * Display the specified resource.
  * 展示特定分组下的动态设置
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     //需关联查询
     /*①查出是否有该分组id,不存在则抛出异常*/
     $type = $this->setting->getById($id);
     /*②存在该分组id,则显示出该分组id下所有动态设置项*/
     $settings = $this->setting->show($id);
     $typename = $type->name;
     return view('back.setting.index', compact('settings', 'typename'));
 }