Exemple #1
0
 public function update(Request $request, $id)
 {
     $params = $request->all();
     $homeNavigation = AppWeb::find($id);
     if ($homeNavigation != null) {
         if ($request->hasFile('contentImage')) {
             $file = $request->file('contentImage');
             $fileName = md5(uniqid()) . '.' . $file->getClientOriginalExtension();
             $file->move(base_path() . '/public/upload', $fileName);
             $homeNavigation->pic = '/upload/' . $fileName;
         }
         $homeNavigation->save();
     }
     return redirect()->action('Admin\\AppWebController@show');
 }
Exemple #2
0
 /**
  *
  * @SWG\Api(
  *   path="/wap/app_web/{id}",
  *   @SWG\Operation(
  *     method="GET", summary="app web页", notes="app web页",
  *     @SWG\ResponseMessage(code=0, message="成功"),
  *     @SWG\Parameter(
  *         name="id",
  *         description="id:1->妃色简介,2->妃色评价,3->软件许可协议,4->常见问题,5->快速领券",
  *         paramType="path",
  *         required=true,
  *         allowMultiple=false,
  *         type="integer",
  *     )
  *
  *   )
  * )
  */
 public function appWeb($id)
 {
     $data['app_web'] = AppWeb::find($id)->toArray();
     return view('wap.app_web', $data);
 }