/** * Get Contract With Tasks * * @param $id * @return Contract */ public function findWithTasks($id) { try { return $this->contract->findContractWithTasks($id); } catch (ModelNotFoundException $e) { $this->logger->error('Contract not found.', ['Contract ID' => $id]); } catch (Exception $e) { $this->logger->error($e->getMessage()); } return null; }