Example #1
0
 public function index()
 {
     try {
         return $this->repository->with('projects')->all();
     } catch (ModelNotFoundException $e) {
         return ['error' => true, 'message' => 'No data.'];
     } catch (\Exception $e) {
         return ['error' => true, 'message' => 'An error occurred when trying to update the data. Try again later.'];
     }
 }
Example #2
0
 public function index()
 {
     return $this->repository->with(['project'])->all();
 }