示例#1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update(StoreStatus $request, $id)
 {
     try {
         $status = Status::findOrFail($id);
     } catch (ModelNotFoundException $e) {
         abort(404);
     }
     $status->update($request->all());
     $status->save();
     return redirect('statuses')->with('alert-success', 'Статус обновлен');
 }
 /**
  * Deletes the specified status.
  *
  * @param int|string $id
  *
  * @return bool
  */
 public function destroy($id)
 {
     $status = $this->status->findOrFail($id);
     return $status->delete();
 }