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' => [ 'id' => [ "type" => 'text', "label" => trans('activity::calendar.label.id'), "placeholder" => trans('activity::calendar.placeholder.id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'type_id' => [ "type" => 'text', "label" => trans('activity::calendar.label.type_id'), "placeholder" => trans('activity::calendar.placeholder.type_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'parent_id' => [ "type" => 'text', "label" => trans('activity::calendar.label.parent_id'), "placeholder" => trans('activity::calendar.placeholder.parent_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'parent_type' => [ "type" => 'text', "label" => trans('activity::calendar.label.parent_type'), "placeholder" => trans('activity::calendar.placeholder.parent_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'name' => [ "type" => 'text', "label" => trans('activity::calendar.label.name'), "placeholder" => trans('activity::calendar.placeholder.name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'slug' => [ "type" => 'text', "label" => trans('activity::calendar.label.slug'), "placeholder" => trans('activity::calendar.placeholder.slug'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'end_date' => [ "type" => 'text', "label" => trans('activity::calendar.label.end_date'), "placeholder" => trans('activity::calendar.placeholder.end_date'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'duration_id' => [ "type" => 'text', "label" => trans('activity::calendar.label.duration_id'), "placeholder" => trans('activity::calendar.placeholder.duration_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'status_id' => [ "type" => 'text', "label" => trans('activity::calendar.label.status_id'), "placeholder" => trans('activity::calendar.placeholder.status_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'assigned_id' => [ "type" => 'text', "label" => trans('activity::calendar.label.assigned_id'), "placeholder" => trans('activity::calendar.placeholder.assigned_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'reminder' => [ "type" => 'text', "label" => trans('activity::calendar.label.reminder'), "placeholder" => trans('activity::calendar.placeholder.reminder'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'user_id' => [ "type" => 'text', "label" => trans('activity::calendar.label.user_id'), "placeholder" => trans('activity::calendar.placeholder.user_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'user_type' => [ "type" => 'text', "label" => trans('activity::calendar.label.user_type'), "placeholder" => trans('activity::calendar.placeholder.user_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'start_date' => [ "type" => 'text', "label" => trans('activity::calendar.label.start_date'), "placeholder" => trans('activity::calendar.placeholder.start_date'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'start_time' => [ "type" => 'text', "label" => trans('activity::calendar.label.start_time'), "placeholder" => trans('activity::calendar.placeholder.start_time'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'type' => [ "type" => 'text', "label" => trans('activity::calendar.label.type'), "placeholder" => trans('activity::calendar.placeholder.type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'deleted_at' => [ "type" => 'text', "label" => trans('activity::calendar.label.deleted_at'), "placeholder" => trans('activity::calendar.placeholder.deleted_at'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'updated_at' => [ "type" => 'text', "label" => trans('activity::calendar.label.updated_at'), "placeholder" => trans('activity::calendar.placeholder.updated_at'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'created_at' => [ "type" => 'text', "label" => trans('activity::calendar.label.created_at'), "placeholder" => trans('activity::calendar.placeholder.created_at'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }