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('organisation::employee.label.company_id'), "placeholder" => trans('organisation::employee.placeholder.company_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'file_id' => [ "type" => 'numeric', "label" => trans('organisation::employee.label.file_id'), "placeholder" => trans('organisation::employee.placeholder.file_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'manager_id' => [ "type" => 'numeric', "label" => trans('organisation::employee.label.manager_id'), "placeholder" => trans('organisation::employee.placeholder.manager_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'name' => [ "type" => 'text', "label" => trans('organisation::employee.label.name'), "placeholder" => trans('organisation::employee.placeholder.name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'last_name' => [ "type" => 'text', "label" => trans('organisation::employee.label.last_name'), "placeholder" => trans('organisation::employee.placeholder.last_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'email' => [ "type" => 'email', "label" => trans('organisation::employee.label.email'), "placeholder" => trans('organisation::employee.placeholder.email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'gender' => [ "type" => 'text', "label" => trans('organisation::employee.label.gender'), "placeholder" => trans('organisation::employee.placeholder.gender'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'ethnicity' => [ "type" => 'text', "label" => trans('organisation::employee.label.ethnicity'), "placeholder" => trans('organisation::employee.placeholder.ethnicity'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'overall_node' => [ "type" => 'text', "label" => trans('organisation::employee.label.overall_node'), "placeholder" => trans('organisation::employee.placeholder.overall_node'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'region' => [ "type" => 'text', "label" => trans('organisation::employee.label.region'), "placeholder" => trans('organisation::employee.placeholder.region'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'country' => [ "type" => 'text', "label" => trans('organisation::employee.label.country'), "placeholder" => trans('organisation::employee.placeholder.country'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'location_group' => [ "type" => 'text', "label" => trans('organisation::employee.label.location_group'), "placeholder" => trans('organisation::employee.placeholder.location_group'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'location' => [ "type" => 'text', "label" => trans('organisation::employee.label.location'), "placeholder" => trans('organisation::employee.placeholder.location'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'performance' => [ "type" => 'text', "label" => trans('organisation::employee.label.performance'), "placeholder" => trans('organisation::employee.placeholder.performance'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'bonus_class' => [ "type" => 'text', "label" => trans('organisation::employee.label.bonus_class'), "placeholder" => trans('organisation::employee.placeholder.bonus_class'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'emp_class' => [ "type" => 'text', "label" => trans('organisation::employee.label.emp_class'), "placeholder" => trans('organisation::employee.placeholder.emp_class'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'tenure' => [ "type" => 'text', "label" => trans('organisation::employee.label.tenure'), "placeholder" => trans('organisation::employee.placeholder.tenure'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'people_manager' => [ "type" => 'radios', "label" => trans('organisation::employee.label.people_manager'), "placeholder" => trans('organisation::employee.placeholder.people_manager'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'generation' => [ "type" => 'text', "label" => trans('organisation::employee.label.generation'), "placeholder" => trans('organisation::employee.placeholder.generation'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'position' => [ "type" => 'text', "label" => trans('organisation::employee.label.position'), "placeholder" => trans('organisation::employee.placeholder.position'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'job_type' => [ "type" => 'text', "label" => trans('organisation::employee.label.job_type'), "placeholder" => trans('organisation::employee.placeholder.job_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }