/** * @param $form_id */ public function getView($form_id) { Coanda::checkAccess('webforms', 'view'); try { $form = $this->webFormsRepository->getForm($form_id); $field_headings = $this->webFormsRepository->dataHeadings($form, 5); return View::make('coanda-web-forms::admin.view', ['form' => $form, 'field_headings' => $field_headings]); } catch (WebFormNotFoundException $exception) { App::abort('404'); } }
/** * */ private function addHeadings() { $this->headings = $this->formsRepository->dataHeadings($this->form); $this->headings['created_at'] = 'Submitted'; $this->csv->insertOne($this->headings); }