mercredi 9 octobre 2019

How to get values from mongodb in laravel?

  $event_details = Event::where(['active'=>1,'moderationType' => 'Open'])->orWhere([ 'moderationType' => 'Moderated', 'faculties.id'=>new ObjectId($faculty_id)]); 

this is an example query which i have a collection named Event it includes event details. each events are classified into two type open and moderated.here we have faculties for replying public questions. if an event is moderated then questions from public can answer only by assigned faculty. if it is an open event then all the faculty can view the questions and answer it.

What i Need is :

i want to list the event details which includes both opened events and assigned events. i am using datatable to list it .



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire