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' => [ 'first_name' => [ "type" => 'text', "label" => trans('care_provider::care_provider.label.first_name'), "placeholder" => trans('care_provider::care_provider.placeholder.first_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'last_name' => [ "type" => 'text', "label" => trans('care_provider::care_provider.label.last_name'), "placeholder" => trans('care_provider::care_provider.placeholder.last_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'email' => [ "type" => 'text', "label" => trans('care_provider::care_provider.label.email'), "placeholder" => trans('care_provider::care_provider.placeholder.email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'phone' => [ "type" => 'numeric', "label" => trans('care_provider::care_provider.label.phone'), "placeholder" => trans('care_provider::care_provider.placeholder.phone'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'dob' => [ "type" => 'date_picker', "label" => trans('care_provider::care_provider.label.dob'), "placeholder" => trans('care_provider::care_provider.placeholder.dob'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'address_line1' => [ "type" => 'text', "label" => trans('care_provider::care_provider.label.address_line1'), "placeholder" => trans('care_provider::care_provider.placeholder.address_line1'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'address_line2' => [ "type" => 'text', "label" => trans('care_provider::care_provider.label.address_line2'), "placeholder" => trans('care_provider::care_provider.placeholder.address_line2'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'city' => [ "type" => 'text', "label" => trans('care_provider::care_provider.label.city'), "placeholder" => trans('care_provider::care_provider.placeholder.city'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'post_code' => [ "type" => 'text', "label" => trans('care_provider::care_provider.label.post_code'), "placeholder" => trans('care_provider::care_provider.placeholder.post_code'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'state_id' => [ "type" => 'numeric', "label" => trans('care_provider::care_provider.label.state_id'), "placeholder" => trans('care_provider::care_provider.placeholder.state_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'package_type' => [ "type" => 'radios', "label" => trans('care_provider::care_provider.label.package_type'), "placeholder" => trans('care_provider::care_provider.placeholder.package_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'type' => [ "type" => 'text', "label" => trans('care_provider::care_provider.label.type'), "placeholder" => trans('care_provider::care_provider.placeholder.type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'self_managed' => [ "type" => 'radios', "label" => trans('care_provider::care_provider.label.self_managed'), "placeholder" => trans('care_provider::care_provider.placeholder.self_managed'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'care_provider' => [ "type" => 'text', "label" => trans('care_provider::care_provider.label.care_provider'), "placeholder" => trans('care_provider::care_provider.placeholder.care_provider'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'care_first_name' => [ "type" => 'text', "label" => trans('care_provider::care_provider.label.care_first_name'), "placeholder" => trans('care_provider::care_provider.placeholder.care_first_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'care_last_name' => [ "type" => 'text', "label" => trans('care_provider::care_provider.label.care_last_name'), "placeholder" => trans('care_provider::care_provider.placeholder.care_last_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'care_email' => [ "type" => 'text', "label" => trans('care_provider::care_provider.label.care_email'), "placeholder" => trans('care_provider::care_provider.placeholder.care_email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'care_phone' => [ "type" => 'numeric', "label" => trans('care_provider::care_provider.label.care_phone'), "placeholder" => trans('care_provider::care_provider.placeholder.care_phone'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'submitted_by' => [ "type" => 'text', "label" => trans('care_provider::care_provider.label.submitted_by'), "placeholder" => trans('care_provider::care_provider.placeholder.submitted_by'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'referel_source' => [ "type" => 'text', "label" => trans('care_provider::care_provider.label.referel_source'), "placeholder" => trans('care_provider::care_provider.placeholder.referel_source'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'terms' => [ "type" => 'numeric', "label" => trans('care_provider::care_provider.label.terms'), "placeholder" => trans('care_provider::care_provider.placeholder.terms'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'company_id' => [ "type" => 'numeric', "label" => trans('care_provider::care_provider.label.company_id'), "placeholder" => trans('care_provider::care_provider.placeholder.company_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'case_manager_id' => [ "type" => 'numeric', "label" => trans('care_provider::care_provider.label.case_manager_id'), "placeholder" => trans('care_provider::care_provider.placeholder.case_manager_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }