public function destroy($id) { try { $this->repository->delete($id); return ['success' => true, 'message' => 'Nota excluida com sucesso!']; } catch (ModelNotFoundException $e) { return ['error' => true, 'message' => $e->getMessage()]; } catch (QueryException $e) { return ['error' => true, 'message' => $e->getMessage()]; } }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { // return $this->repository->skipPresenter()->all(); }