setForm(); } /** * Return form elements. * * @return array. */ public function form($element = 'fields', $grouped = true) { $item = collect($this->form->get($element)); if ($element == 'fields' && $grouped == true) { return $item->groupBy(['group', 'section']); } return $item; } /** * Sets the form and form elements. * @return null. */ public function setForm() { $this->form = collect([ 'form' => [ 'store' => [], 'update' => [], ], 'groups' => [ 'main' => 'Main', ], 'fields' => [ 'company_id' => [ "type" => 'numeric', "label" => trans('survey::notific.label.company_id'), "placeholder" => trans('survey::notific.placeholder.company_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'survey_id' => [ "type" => 'select', "label" => trans('survey::notific.label.survey_id'), "placeholder" => trans('survey::notific.placeholder.survey_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'type' => [ "type" => 'select', "label" => trans('survey::notific.label.type'), "placeholder" => trans('survey::notific.placeholder.type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'to' => [ "type" => 'text', "label" => trans('survey::notific.label.to'), "placeholder" => trans('survey::notific.placeholder.to'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'cc' => [ "type" => 'text', "label" => trans('survey::notific.label.cc'), "placeholder" => trans('survey::notific.placeholder.cc'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'bcc' => [ "type" => 'text', "label" => trans('survey::notific.label.bcc'), "placeholder" => trans('survey::notific.placeholder.bcc'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'subject' => [ "type" => 'text', "label" => trans('survey::notific.label.subject'), "placeholder" => trans('survey::notific.placeholder.subject'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'details' => [ "type" => 'textarea', "label" => trans('survey::notific.label.details'), "placeholder" => trans('survey::notific.placeholder.details'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }