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' => [ 'name' => [ "type" => 'text', "label" => trans('pm::roadmap.label.name'), "placeholder" => trans('pm::roadmap.placeholder.name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'starts_on' => [ "type" => 'date_picker', "label" => trans('pm::roadmap.label.starts_on'), "placeholder" => trans('pm::roadmap.placeholder.starts_on'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'ends_on' => [ "type" => 'date_picker', "label" => trans('pm::roadmap.label.ends_on'), "placeholder" => trans('pm::roadmap.placeholder.ends_on'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'created_by' => [ "type" => 'numeric', "label" => trans('pm::roadmap.label.created_by'), "placeholder" => trans('pm::roadmap.placeholder.created_by'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ')' => [ "type" => 'text', "label" => trans('pm::roadmap.label.)'), "placeholder" => trans('pm::roadmap.placeholder.)'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }