mercredi 5 juin 2019

concurrent user registration in laravel to mongodb

controller code

        $profileDetailsobj = new \stdClass();$profile =  [];

      //  dd($workshop);

        if ($workshop->isPublish == 1 && $course_id) {

    //  dd("as");
            $profile['profileId'] = uniqid().$request->input('first_name').time();
            $profile['courseId']=$course_id;
            $profile['name'] = $request->input('salutation')." ".$request->input('first_name')." ".$request->input('last_name');

            $profileDetailsobj->profileDetails[] = $profile;
            $workshop->registeredProfiles = $profileDetailsobj;
            $workshop->save();
        }

this is my code i want to register multiple user entry to mongodb now its only adding only one entry hw to make as multiple



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire