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' => [ 'reporting_to' => [ "type" => 'numeric', "label" => trans('plan::manager.label.reporting_to'), "placeholder" => trans('plan::manager.placeholder.reporting_to'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'name' => [ "type" => 'text', "label" => trans('plan::manager.label.name'), "placeholder" => trans('plan::manager.placeholder.name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'email' => [ "type" => 'text', "label" => trans('plan::manager.label.email'), "placeholder" => trans('plan::manager.placeholder.email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'password' => [ "type" => 'text', "label" => trans('plan::manager.label.password'), "placeholder" => trans('plan::manager.placeholder.password'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'api_token' => [ "type" => 'text', "label" => trans('plan::manager.label.api_token'), "placeholder" => trans('plan::manager.placeholder.api_token'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'remember_token' => [ "type" => 'text', "label" => trans('plan::manager.label.remember_token'), "placeholder" => trans('plan::manager.placeholder.remember_token'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'sex' => [ "type" => 'radios', "label" => trans('plan::manager.label.sex'), "placeholder" => trans('plan::manager.placeholder.sex'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'dob' => [ "type" => 'date_picker', "label" => trans('plan::manager.label.dob'), "placeholder" => trans('plan::manager.placeholder.dob'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'designation' => [ "type" => 'text', "label" => trans('plan::manager.label.designation'), "placeholder" => trans('plan::manager.placeholder.designation'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'department' => [ "type" => 'text', "label" => trans('plan::manager.label.department'), "placeholder" => trans('plan::manager.placeholder.department'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'position' => [ "type" => 'text', "label" => trans('plan::manager.label.position'), "placeholder" => trans('plan::manager.placeholder.position'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'buisiness_unit' => [ "type" => 'text', "label" => trans('plan::manager.label.buisiness_unit'), "placeholder" => trans('plan::manager.placeholder.buisiness_unit'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'mobile' => [ "type" => 'text', "label" => trans('plan::manager.label.mobile'), "placeholder" => trans('plan::manager.placeholder.mobile'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'phone' => [ "type" => 'text', "label" => trans('plan::manager.label.phone'), "placeholder" => trans('plan::manager.placeholder.phone'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'address' => [ "type" => 'text', "label" => trans('plan::manager.label.address'), "placeholder" => trans('plan::manager.placeholder.address'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'street' => [ "type" => 'text', "label" => trans('plan::manager.label.street'), "placeholder" => trans('plan::manager.placeholder.street'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'city' => [ "type" => 'text', "label" => trans('plan::manager.label.city'), "placeholder" => trans('plan::manager.placeholder.city'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'district' => [ "type" => 'text', "label" => trans('plan::manager.label.district'), "placeholder" => trans('plan::manager.placeholder.district'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'state' => [ "type" => 'text', "label" => trans('plan::manager.label.state'), "placeholder" => trans('plan::manager.placeholder.state'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'country' => [ "type" => 'text', "label" => trans('plan::manager.label.country'), "placeholder" => trans('plan::manager.placeholder.country'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'zipcode' => [ "type" => 'text', "label" => trans('plan::manager.label.zipcode'), "placeholder" => trans('plan::manager.placeholder.zipcode'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'photo' => [ "type" => 'text', "label" => trans('plan::manager.label.photo'), "placeholder" => trans('plan::manager.placeholder.photo'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'web' => [ "type" => 'text', "label" => trans('plan::manager.label.web'), "placeholder" => trans('plan::manager.placeholder.web'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'permissions' => [ "type" => 'html_editor', "label" => trans('plan::manager.label.permissions'), "placeholder" => trans('plan::manager.placeholder.permissions'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'email_verified_at' => [ "type" => 'date_time_picker', "label" => trans('plan::manager.label.email_verified_at'), "placeholder" => trans('plan::manager.placeholder.email_verified_at'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'team_id' => [ "type" => 'numeric', "label" => trans('plan::manager.label.team_id'), "placeholder" => trans('plan::manager.placeholder.team_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'age_range' => [ "type" => 'radios', "label" => trans('plan::manager.label.age_range'), "placeholder" => trans('plan::manager.placeholder.age_range'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'emergency_name' => [ "type" => 'text', "label" => trans('plan::manager.label.emergency_name'), "placeholder" => trans('plan::manager.placeholder.emergency_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'emergency_company' => [ "type" => 'text', "label" => trans('plan::manager.label.emergency_company'), "placeholder" => trans('plan::manager.placeholder.emergency_company'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'relationship' => [ "type" => 'text', "label" => trans('plan::manager.label.relationship'), "placeholder" => trans('plan::manager.placeholder.relationship'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'emergency_contact' => [ "type" => 'text', "label" => trans('plan::manager.label.emergency_contact'), "placeholder" => trans('plan::manager.placeholder.emergency_contact'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'emergency_email' => [ "type" => 'text', "label" => trans('plan::manager.label.emergency_email'), "placeholder" => trans('plan::manager.placeholder.emergency_email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }