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' => [ 'parent_id' => [ "type" => 'numeric', "label" => trans('activity::meeting.label.parent_id'), "placeholder" => trans('activity::meeting.placeholder.parent_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'parent_type' => [ "type" => 'numeric', "label" => trans('activity::meeting.label.parent_type'), "placeholder" => trans('activity::meeting.placeholder.parent_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'name' => [ "type" => 'text', "label" => trans('activity::meeting.label.name'), "placeholder" => trans('activity::meeting.placeholder.name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'date_start' => [ "type" => 'date_time_picker', "label" => trans('activity::meeting.label.date_start'), "placeholder" => trans('activity::meeting.placeholder.date_start'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'date_end' => [ "type" => 'date_time_picker', "label" => trans('activity::meeting.label.date_end'), "placeholder" => trans('activity::meeting.placeholder.date_end'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'duration' => [ "type" => 'text', "label" => trans('activity::meeting.label.duration'), "placeholder" => trans('activity::meeting.placeholder.duration'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'assigned_to' => [ "type" => 'numeric', "label" => trans('activity::meeting.label.assigned_to'), "placeholder" => trans('activity::meeting.placeholder.assigned_to'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'reminders' => [ "type" => 'text', "label" => trans('activity::meeting.label.reminders'), "placeholder" => trans('activity::meeting.placeholder.reminders'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'shedule_time' => [ "type" => 'text', "label" => trans('activity::meeting.label.shedule_time'), "placeholder" => trans('activity::meeting.placeholder.shedule_time'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'description' => [ "type" => 'text', "label" => trans('activity::meeting.label.description'), "placeholder" => trans('activity::meeting.placeholder.description'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }