Ejemplo n.º 1
0
 /**
  * Find a existent project task
  * @param $id
  */
 public function findWhere($id, $taskId)
 {
     try {
         return $this->repository->findWhere(['project_id' => $id, 'id' => $taskId]);
     } catch (ModelNotFoundException $e) {
         return ['error' => true, 'message' => $e->getMessage()];
     }
 }
Ejemplo n.º 2
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index($id)
 {
     //
     return $this->repository->findWhere(['project_id' => $id]);
 }