Example #1
0
 public function storeCustomRecord($parameters)
 {
     $form = Form::create(['name_401' => $this->request->input('name'), 'email_account_id_401' => $this->request->input('emailAccount'), 'push_notification_401' => $this->request->has('pushNotification')]);
     $forwardsData = json_decode($this->request->input('forwardsData'));
     foreach ($forwardsData as $forwardData) {
         $forwards[] = ["form_id_402" => $form->id_401, "name_402" => $forwardData->name_402, "email_402" => trim(strtolower($forwardData->email_402)), "comments_402" => $forwardData->comments_402, "states_402" => $forwardData->states_402];
     }
     if (isset($forwards) && count($forwards) > 0) {
         Forward::insert($forwards);
     }
 }