Add Json Response Helper

This commit is contained in:
R
2022-11-02 21:48:14 +07:00
parent 429dc476e2
commit 9a7f26928f
3 changed files with 15 additions and 4 deletions

View File

@@ -61,10 +61,7 @@ class DoctorController extends Controller
$doctors = $doctors->paginate($limit);
return response()->json([
'message' => 'Sukses mengambil data Dokter',
'doctors' => Helper::paginateResources(PractitionerRoleToDoctorResource::collection($doctors))
]);
return Helper::makeJsonResponse(Helper::paginateResources(PractitionerRoleToDoctorResource::collection($doctors)));
}
/**