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' => [ 'office_id' => [ "type" => 'numeric', "label" => trans('employee::employees.label.office_id'), "placeholder" => trans('employee::employees.placeholder.office_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'division_id' => [ "type" => 'numeric', "label" => trans('employee::employees.label.division_id'), "placeholder" => trans('employee::employees.placeholder.division_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'department_id' => [ "type" => 'numeric', "label" => trans('employee::employees.label.department_id'), "placeholder" => trans('employee::employees.placeholder.department_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'manager_id' => [ "type" => 'numeric', "label" => trans('employee::employees.label.manager_id'), "placeholder" => trans('employee::employees.placeholder.manager_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'first_name' => [ "type" => 'text', "label" => trans('employee::employees.label.first_name'), "placeholder" => trans('employee::employees.placeholder.first_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'last_name' => [ "type" => 'text', "label" => trans('employee::employees.label.last_name'), "placeholder" => trans('employee::employees.placeholder.last_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'dob' => [ "type" => 'date_picker', "label" => trans('employee::employees.label.dob'), "placeholder" => trans('employee::employees.placeholder.dob'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'gender' => [ "type" => 'radios', "label" => trans('employee::employees.label.gender'), "placeholder" => trans('employee::employees.placeholder.gender'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'martial_status' => [ "type" => 'radios', "label" => trans('employee::employees.label.martial_status'), "placeholder" => trans('employee::employees.placeholder.martial_status'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'religion' => [ "type" => 'text', "label" => trans('employee::employees.label.religion'), "placeholder" => trans('employee::employees.placeholder.religion'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'languages' => [ "type" => 'text', "label" => trans('employee::employees.label.languages'), "placeholder" => trans('employee::employees.placeholder.languages'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'nationality' => [ "type" => 'text', "label" => trans('employee::employees.label.nationality'), "placeholder" => trans('employee::employees.placeholder.nationality'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact_home_address' => [ "type" => 'text', "label" => trans('employee::employees.label.contact_home_address'), "placeholder" => trans('employee::employees.placeholder.contact_home_address'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact_home_phone' => [ "type" => 'text', "label" => trans('employee::employees.label.contact_home_phone'), "placeholder" => trans('employee::employees.placeholder.contact_home_phone'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact_home_email' => [ "type" => 'text', "label" => trans('employee::employees.label.contact_home_email'), "placeholder" => trans('employee::employees.placeholder.contact_home_email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact_work_address' => [ "type" => 'text', "label" => trans('employee::employees.label.contact_work_address'), "placeholder" => trans('employee::employees.placeholder.contact_work_address'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact_work_phone' => [ "type" => 'text', "label" => trans('employee::employees.label.contact_work_phone'), "placeholder" => trans('employee::employees.placeholder.contact_work_phone'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact_work_email' => [ "type" => 'text', "label" => trans('employee::employees.label.contact_work_email'), "placeholder" => trans('employee::employees.placeholder.contact_work_email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact_work_mobile' => [ "type" => 'text', "label" => trans('employee::employees.label.contact_work_mobile'), "placeholder" => trans('employee::employees.placeholder.contact_work_mobile'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact_emergency_name' => [ "type" => 'text', "label" => trans('employee::employees.label.contact_emergency_name'), "placeholder" => trans('employee::employees.placeholder.contact_emergency_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact_emergency_address' => [ "type" => 'text', "label" => trans('employee::employees.label.contact_emergency_address'), "placeholder" => trans('employee::employees.placeholder.contact_emergency_address'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact_emergency_phone' => [ "type" => 'text', "label" => trans('employee::employees.label.contact_emergency_phone'), "placeholder" => trans('employee::employees.placeholder.contact_emergency_phone'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact_emergency_relation' => [ "type" => 'text', "label" => trans('employee::employees.label.contact_emergency_relation'), "placeholder" => trans('employee::employees.placeholder.contact_emergency_relation'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'employment_job_title' => [ "type" => 'text', "label" => trans('employee::employees.label.employment_job_title'), "placeholder" => trans('employee::employees.placeholder.employment_job_title'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'employment_user_role' => [ "type" => 'radios', "label" => trans('employee::employees.label.employment_user_role'), "placeholder" => trans('employee::employees.placeholder.employment_user_role'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'employment_start_date' => [ "type" => 'date_picker', "label" => trans('employee::employees.label.employment_start_date'), "placeholder" => trans('employee::employees.placeholder.employment_start_date'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'employment_end_date' => [ "type" => 'date_picker', "label" => trans('employee::employees.label.employment_end_date'), "placeholder" => trans('employee::employees.placeholder.employment_end_date'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'account_bank_name' => [ "type" => 'text', "label" => trans('employee::employees.label.account_bank_name'), "placeholder" => trans('employee::employees.placeholder.account_bank_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'account_bank_address' => [ "type" => 'text', "label" => trans('employee::employees.label.account_bank_address'), "placeholder" => trans('employee::employees.placeholder.account_bank_address'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'account_routing_code' => [ "type" => 'text', "label" => trans('employee::employees.label.account_routing_code'), "placeholder" => trans('employee::employees.placeholder.account_routing_code'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'account_number' => [ "type" => 'text', "label" => trans('employee::employees.label.account_number'), "placeholder" => trans('employee::employees.placeholder.account_number'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'account_iban_number' => [ "type" => 'text', "label" => trans('employee::employees.label.account_iban_number'), "placeholder" => trans('employee::employees.placeholder.account_iban_number'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'account_name' => [ "type" => 'text', "label" => trans('employee::employees.label.account_name'), "placeholder" => trans('employee::employees.placeholder.account_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contract_business_licence' => [ "type" => 'text', "label" => trans('employee::employees.label.contract_business_licence'), "placeholder" => trans('employee::employees.placeholder.contract_business_licence'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contract_type' => [ "type" => 'radios', "label" => trans('employee::employees.label.contract_type'), "placeholder" => trans('employee::employees.placeholder.contract_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contract_number' => [ "type" => 'text', "label" => trans('employee::employees.label.contract_number'), "placeholder" => trans('employee::employees.placeholder.contract_number'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contract_start_date' => [ "type" => 'date_picker', "label" => trans('employee::employees.label.contract_start_date'), "placeholder" => trans('employee::employees.placeholder.contract_start_date'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contract_end_date' => [ "type" => 'date_picker', "label" => trans('employee::employees.label.contract_end_date'), "placeholder" => trans('employee::employees.placeholder.contract_end_date'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contract_copy' => [ "type" => 'text', "label" => trans('employee::employees.label.contract_copy'), "placeholder" => trans('employee::employees.placeholder.contract_copy'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'current_salary' => [ "type" => 'numeric', "label" => trans('employee::employees.label.current_salary'), "placeholder" => trans('employee::employees.placeholder.current_salary'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'created_id' => [ "type" => 'numeric', "label" => trans('employee::employees.label.created_id'), "placeholder" => trans('employee::employees.placeholder.created_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }