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('activities::call.label.parent_id'), "placeholder" => trans('activities::call.placeholder.parent_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'parent_type' => [ "type" => 'numeric', "label" => trans('activities::call.label.parent_type'), "placeholder" => trans('activities::call.placeholder.parent_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'name' => [ "type" => 'text', "label" => trans('activities::call.label.name'), "placeholder" => trans('activities::call.placeholder.name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'date_start' => [ "type" => 'date_time_picker', "label" => trans('activities::call.label.date_start'), "placeholder" => trans('activities::call.placeholder.date_start'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'date_end' => [ "type" => 'date_time_picker', "label" => trans('activities::call.label.date_end'), "placeholder" => trans('activities::call.placeholder.date_end'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'direction' => [ "type" => 'text', "label" => trans('activities::call.label.direction'), "placeholder" => trans('activities::call.placeholder.direction'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'description' => [ "type" => 'textarea', "label" => trans('activities::call.label.description'), "placeholder" => trans('activities::call.placeholder.description'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'hot' => [ "type" => 'text', "label" => trans('activities::call.label.hot'), "placeholder" => trans('activities::call.placeholder.hot'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'called_on' => [ "type" => 'date_picker', "label" => trans('activities::call.label.called_on'), "placeholder" => trans('activities::call.placeholder.called_on'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'duration' => [ "type" => 'text', "label" => trans('activities::call.label.duration'), "placeholder" => trans('activities::call.placeholder.duration'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'substatus' => [ "type" => 'text', "label" => trans('activities::call.label.substatus'), "placeholder" => trans('activities::call.placeholder.substatus'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'notes' => [ "type" => 'text', "label" => trans('activities::call.label.notes'), "placeholder" => trans('activities::call.placeholder.notes'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'audio' => [ "type" => 'text', "label" => trans('activities::call.label.audio'), "placeholder" => trans('activities::call.placeholder.audio'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'assigned_to' => [ "type" => 'numeric', "label" => trans('activities::call.label.assigned_to'), "placeholder" => trans('activities::call.placeholder.assigned_to'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }