Exemplo n.º 1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  Request  $request
  * @param  int  $id
  * @return Response
  */
 public function update(Request $request, $id)
 {
     $version = Version::find($id);
     $version->application_id = $request->input('application_id');
     $version->version = $request->input('version');
     $version->is_released = $request->input('is_released');
     $version->save();
 }
Exemplo n.º 2
0
 public function update(array $data, $id)
 {
     $version = Version::find($id);
     $version->title = $data['title'];
     $version->version_code = $data['version_code'];
     $version->version_name = $data['version_name'];
     $version->description = $data['description'];
     $version->app_url = $data['app_url'];
     $version->user_id = Auth::id();
     $version->save();
     return $version;
 }
Exemplo n.º 3
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     //
     $version = Version::find($id);
     $version->delete();
     if ($version->id) {
         flash()->success('操作成功');
     } else {
         flash()->error('操作失败');
     }
     return redirect()->back();
 }