mercredi 7 novembre 2018

get all Materials based from UUID from two variables

so, I have $patient_banner that returns this:

[
    "3d078010-e24b-11e8-ab1d-2b077991ec5f",
    "64095f20-e25c-11e8-a2de-171e70f82e0f",
    "6b3ea0e0-e24b-11e8-8316-13a0f1f91303",
    "d9b275b0-e249-11e8-b8ce-fd92c15325d5",
    "7535baf0-e23e-11e8-8297-f50579ab9646"
]

and I have $material_ids that returns this:

[
    "65903500-9fe2-11e8-9dc3-9d0a219835de",
    "67e52880-d74f-11e8-921e-8f389ce79225"
]

and I am executing this code:

$material  = new Material;

$materials  = $material->whereIn(
   'uuid',
   [$material_ids, $patient_banner]
);


What I want to happen is that, it would return the Materials that has the UUIDS from both $patient_banner and $material_idsso it should return 7 materials, but what I am getting are only 2 materials who are in the $material_ids. What should I do to get 7 materials from 2 different variables?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire