Apply Pagination
This commit is contained in:
@@ -21,7 +21,7 @@ class BenefitController extends Controller
|
||||
$benefits = Benefit::query()
|
||||
->filter($request->all())
|
||||
->where('corporate_id', $corporate_id)
|
||||
->paginate(999)
|
||||
->paginate()
|
||||
->appends($request->all());
|
||||
|
||||
return $benefits;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace Modules\Internal\Http\Controllers\Api;
|
||||
|
||||
use App\Exceptions\ImportRowException;
|
||||
use App\Helpers\Helper;
|
||||
use App\Models\Corporate;
|
||||
use App\Models\Exclusion;
|
||||
use App\Models\Icd;
|
||||
@@ -29,7 +30,8 @@ class DiagnosisExclusionController extends Controller
|
||||
->with(['exclusionable', 'rules'])
|
||||
->filter($request->toArray())
|
||||
->paginate();
|
||||
|
||||
// return $exclusions;
|
||||
return Helper::paginateResources(DiagnosisExclusionResource::collection($exclusions));
|
||||
return response()->json(DiagnosisExclusionResource::collection($exclusions)->response()->getData(true));
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ class MemberController extends Controller
|
||||
});
|
||||
}
|
||||
])
|
||||
->paginate(20)
|
||||
->paginate()
|
||||
->appends($request->all());
|
||||
|
||||
return $benefits;
|
||||
|
||||
@@ -34,7 +34,7 @@ class PlanController extends Controller
|
||||
// $corporatePlan->where('corporate_id', $corporate_id);
|
||||
// })
|
||||
// ->with('corporatePlan')
|
||||
->paginate(0)
|
||||
->paginate()
|
||||
->appends($request->all());
|
||||
|
||||
return $plans;
|
||||
|
||||
@@ -167,7 +167,7 @@ class MemberEnrollmentService
|
||||
"end_no_claim" => $row['end_no_claim'],
|
||||
];
|
||||
|
||||
if ($corporate->currentPolicy->code != $row['policy_number']) {
|
||||
if (!isset($corporate->currentPolicy) || $corporate->currentPolicy->code != $row['policy_number']) {
|
||||
throw new ImportRowException(__('enrollment.POLICY_NUMBER_NOT_MATCH', [
|
||||
'policy_id' => $row['policy_number']
|
||||
]), 0, null, $row);
|
||||
@@ -555,7 +555,7 @@ class MemberEnrollmentService
|
||||
throw new ImportRowException(__("enrollment.MODE_UNAVAILABLE"), 0, null, $row);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
throw $e; //new ImportRowException($e->getMessage(), (int) $e->getCode(), $e, $row);
|
||||
throw new ImportRowException($e->getMessage(), (int) $e->getCode(), $e, $row);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user