code: public function destroy($id)
      {
          $id = $this->getRealId($id);
          
          $resource = $this->repository->find($id);
          
          if (! $resource) {
              return $this->notFound();
          }
          
          $result = $resource->delete();
          
          return $this->success($result);
      }
docs: Delete a resource.
  
  @return \Illuminate\Http\Response