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' => [ 'company_id' => [ "type" => 'numeric', "label" => trans('employee::employee.label.company_id'), "placeholder" => trans('employee::employee.placeholder.company_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'name' => [ "type" => 'text', "label" => trans('employee::employee.label.name'), "placeholder" => trans('employee::employee.placeholder.name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'email' => [ "type" => 'text', "label" => trans('employee::employee.label.email'), "placeholder" => trans('employee::employee.placeholder.email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'designation' => [ "type" => 'text', "label" => trans('employee::employee.label.designation'), "placeholder" => trans('employee::employee.placeholder.designation'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'age' => [ "type" => 'text', "label" => trans('employee::employee.label.age'), "placeholder" => trans('employee::employee.placeholder.age'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'dob' => [ "type" => 'date_picker', "label" => trans('employee::employee.label.dob'), "placeholder" => trans('employee::employee.placeholder.dob'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'marital_status' => [ "type" => 'select', "label" => trans('employee::employee.label.marital_status'), "placeholder" => trans('employee::employee.placeholder.marital_status'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'gender' => [ "type" => 'select', "label" => trans('employee::employee.label.gender'), "placeholder" => trans('employee::employee.placeholder.gender'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'address' => [ "type" => 'text', "label" => trans('employee::employee.label.address'), "placeholder" => trans('employee::employee.placeholder.address'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'postcode' => [ "type" => 'text', "label" => trans('employee::employee.label.postcode'), "placeholder" => trans('employee::employee.placeholder.postcode'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'passport_no' => [ "type" => 'text', "label" => trans('employee::employee.label.passport_no'), "placeholder" => trans('employee::employee.placeholder.passport_no'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'birth_place' => [ "type" => 'text', "label" => trans('employee::employee.label.birth_place'), "placeholder" => trans('employee::employee.placeholder.birth_place'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'race' => [ "type" => 'text', "label" => trans('employee::employee.label.race'), "placeholder" => trans('employee::employee.placeholder.race'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'religion' => [ "type" => 'text', "label" => trans('employee::employee.label.religion'), "placeholder" => trans('employee::employee.placeholder.religion'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'dialect' => [ "type" => 'text', "label" => trans('employee::employee.label.dialect'), "placeholder" => trans('employee::employee.placeholder.dialect'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'bank_name' => [ "type" => 'text', "label" => trans('employee::employee.label.bank_name'), "placeholder" => trans('employee::employee.placeholder.bank_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'bank_branch' => [ "type" => 'text', "label" => trans('employee::employee.label.bank_branch'), "placeholder" => trans('employee::employee.placeholder.bank_branch'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'bank_account_no' => [ "type" => 'text', "label" => trans('employee::employee.label.bank_account_no'), "placeholder" => trans('employee::employee.placeholder.bank_account_no'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact_home' => [ "type" => 'text', "label" => trans('employee::employee.label.contact_home'), "placeholder" => trans('employee::employee.placeholder.contact_home'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact_mobile' => [ "type" => 'text', "label" => trans('employee::employee.label.contact_mobile'), "placeholder" => trans('employee::employee.placeholder.contact_mobile'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact_office' => [ "type" => 'text', "label" => trans('employee::employee.label.contact_office'), "placeholder" => trans('employee::employee.placeholder.contact_office'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'income_tax_no' => [ "type" => 'text', "label" => trans('employee::employee.label.income_tax_no'), "placeholder" => trans('employee::employee.placeholder.income_tax_no'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'pf_account_no' => [ "type" => 'text', "label" => trans('employee::employee.label.pf_account_no'), "placeholder" => trans('employee::employee.placeholder.pf_account_no'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'driving_licence_no' => [ "type" => 'text', "label" => trans('employee::employee.label.driving_licence_no'), "placeholder" => trans('employee::employee.placeholder.driving_licence_no'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'vehicle_type' => [ "type" => 'text', "label" => trans('employee::employee.label.vehicle_type'), "placeholder" => trans('employee::employee.placeholder.vehicle_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'family_details' => [ "type" => 'text', "label" => trans('employee::employee.label.family_details'), "placeholder" => trans('employee::employee.placeholder.family_details'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'educational_details' => [ "type" => 'text', "label" => trans('employee::employee.label.educational_details'), "placeholder" => trans('employee::employee.placeholder.educational_details'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'language_proficiency' => [ "type" => 'text', "label" => trans('employee::employee.label.language_proficiency'), "placeholder" => trans('employee::employee.placeholder.language_proficiency'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'employement_history' => [ "type" => 'text', "label" => trans('employee::employee.label.employement_history'), "placeholder" => trans('employee::employee.placeholder.employement_history'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'character_referees' => [ "type" => 'text', "label" => trans('employee::employee.label.character_referees'), "placeholder" => trans('employee::employee.placeholder.character_referees'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'emergency_contact' => [ "type" => 'text', "label" => trans('employee::employee.label.emergency_contact'), "placeholder" => trans('employee::employee.placeholder.emergency_contact'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'signature' => [ "type" => 'image', "label" => trans('employee::employee.label.signature'), "placeholder" => trans('employee::employee.placeholder.signature'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'photo' => [ "type" => 'image', "label" => trans('employee::employee.label.photo'), "placeholder" => trans('employee::employee.placeholder.photo'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ')' => [ "type" => 'text', "label" => trans('employee::employee.label.)'), "placeholder" => trans('employee::employee.placeholder.)'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }