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' => [ 'survey_id' => [ "type" => 'numeric', "label" => trans('survey::reminder.label.survey_id'), "placeholder" => trans('survey::reminder.placeholder.survey_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'name' => [ "type" => 'text', "label" => trans('survey::reminder.label.name'), "placeholder" => trans('survey::reminder.placeholder.name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'date' => [ "type" => 'date_picker', "label" => trans('survey::reminder.label.date'), "placeholder" => trans('survey::reminder.placeholder.date'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'subject' => [ "type" => 'text', "label" => trans('survey::reminder.label.subject'), "placeholder" => trans('survey::reminder.placeholder.subject'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'content' => [ "type" => 'html_editor', "label" => trans('survey::reminder.label.content'), "placeholder" => trans('survey::reminder.placeholder.content'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }