Beispiel #1
0
 public function delete($id)
 {
     try {
         $this->repository->delete($id);
     } catch (ModelNotFoundException $e) {
         return ['error' => true, 'message' => 'Client not found'];
     } catch (QueryException $e) {
         return ['error' => true, 'message' => 'Client can not be deleted'];
     }
 }
 public function destroy($id)
 {
     $this->repository->skipPresenter()->find($id)->delete();
 }
 public function destroy($projectId, $id)
 {
     $this->repository->find($id)->delete();
 }