Пример #1
0
 public function update($id, UpdateDocumentRequest $request)
 {
     $doc = Doc::find($id);
     if (!$doc) {
         return response('Not found.', 404);
     }
     $doc->update($request->all());
     return Response::json($doc);
 }
 public function delete(UpdateDocumentRequest $request)
 {
     $request->entity()->delete();
     return RESULT_SUCCESS;
 }