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' => [ 'log_name' => [ "type" => 'text', "label" => trans('activity::activity_log.label.log_name'), "placeholder" => trans('activity::activity_log.placeholder.log_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'description' => [ "type" => 'text', "label" => trans('activity::activity_log.label.description'), "placeholder" => trans('activity::activity_log.placeholder.description'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'subject_id' => [ "type" => 'numeric', "label" => trans('activity::activity_log.label.subject_id'), "placeholder" => trans('activity::activity_log.placeholder.subject_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'subject_type' => [ "type" => 'text', "label" => trans('activity::activity_log.label.subject_type'), "placeholder" => trans('activity::activity_log.placeholder.subject_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'causer_id' => [ "type" => 'numeric', "label" => trans('activity::activity_log.label.causer_id'), "placeholder" => trans('activity::activity_log.placeholder.causer_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'causer_type' => [ "type" => 'text', "label" => trans('activity::activity_log.label.causer_type'), "placeholder" => trans('activity::activity_log.placeholder.causer_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'properties' => [ "type" => 'text', "label" => trans('activity::activity_log.label.properties'), "placeholder" => trans('activity::activity_log.placeholder.properties'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }