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('staff::user.label.reporting_to'), "placeholder" => trans('staff::user.placeholder.reporting_to'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'name' => [ "type" => 'text', "label" => trans('staff::user.label.name'), "placeholder" => trans('staff::user.placeholder.name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'firstname' => [ "type" => 'text', "label" => trans('staff::user.label.firstname'), "placeholder" => trans('staff::user.placeholder.firstname'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'surname' => [ "type" => 'text', "label" => trans('staff::user.label.surname'), "placeholder" => trans('staff::user.placeholder.surname'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'email' => [ "type" => 'text', "label" => trans('staff::user.label.email'), "placeholder" => trans('staff::user.placeholder.email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'user_group' => [ "type" => 'text', "label" => trans('staff::user.label.user_group'), "placeholder" => trans('staff::user.placeholder.user_group'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'office_id' => [ "type" => 'numeric', "label" => trans('staff::user.label.office_id'), "placeholder" => trans('staff::user.placeholder.office_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'title' => [ "type" => 'text', "label" => trans('staff::user.label.title'), "placeholder" => trans('staff::user.placeholder.title'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'wordpress_user' => [ "type" => 'text', "label" => trans('staff::user.label.wordpress_user'), "placeholder" => trans('staff::user.placeholder.wordpress_user'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'active' => [ "type" => 'text', "label" => trans('staff::user.label.active'), "placeholder" => trans('staff::user.placeholder.active'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'print_profile' => [ "type" => 'text', "label" => trans('staff::user.label.print_profile'), "placeholder" => trans('staff::user.placeholder.print_profile'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'profile_pic' => [ "type" => 'text', "label" => trans('staff::user.label.profile_pic'), "placeholder" => trans('staff::user.placeholder.profile_pic'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'town_knowledge' => [ "type" => 'text', "label" => trans('staff::user.label.town_knowledge'), "placeholder" => trans('staff::user.placeholder.town_knowledge'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'knowledge' => [ "type" => 'text', "label" => trans('staff::user.label.knowledge'), "placeholder" => trans('staff::user.placeholder.knowledge'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'ships' => [ "type" => 'text', "label" => trans('staff::user.label.ships'), "placeholder" => trans('staff::user.placeholder.ships'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'statement' => [ "type" => 'text', "label" => trans('staff::user.label.statement'), "placeholder" => trans('staff::user.placeholder.statement'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'password' => [ "type" => 'text', "label" => trans('staff::user.label.password'), "placeholder" => trans('staff::user.placeholder.password'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'api_token' => [ "type" => 'text', "label" => trans('staff::user.label.api_token'), "placeholder" => trans('staff::user.placeholder.api_token'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'remember_token' => [ "type" => 'text', "label" => trans('staff::user.label.remember_token'), "placeholder" => trans('staff::user.placeholder.remember_token'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'sex' => [ "type" => 'radios', "label" => trans('staff::user.label.sex'), "placeholder" => trans('staff::user.placeholder.sex'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'dob' => [ "type" => 'date_picker', "label" => trans('staff::user.label.dob'), "placeholder" => trans('staff::user.placeholder.dob'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'designation' => [ "type" => 'text', "label" => trans('staff::user.label.designation'), "placeholder" => trans('staff::user.placeholder.designation'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'mobile' => [ "type" => 'text', "label" => trans('staff::user.label.mobile'), "placeholder" => trans('staff::user.placeholder.mobile'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'phone' => [ "type" => 'text', "label" => trans('staff::user.label.phone'), "placeholder" => trans('staff::user.placeholder.phone'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'address' => [ "type" => 'text', "label" => trans('staff::user.label.address'), "placeholder" => trans('staff::user.placeholder.address'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'street' => [ "type" => 'text', "label" => trans('staff::user.label.street'), "placeholder" => trans('staff::user.placeholder.street'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'city' => [ "type" => 'text', "label" => trans('staff::user.label.city'), "placeholder" => trans('staff::user.placeholder.city'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'district' => [ "type" => 'text', "label" => trans('staff::user.label.district'), "placeholder" => trans('staff::user.placeholder.district'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'state' => [ "type" => 'text', "label" => trans('staff::user.label.state'), "placeholder" => trans('staff::user.placeholder.state'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'country' => [ "type" => 'text', "label" => trans('staff::user.label.country'), "placeholder" => trans('staff::user.placeholder.country'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'photo' => [ "type" => 'text', "label" => trans('staff::user.label.photo'), "placeholder" => trans('staff::user.placeholder.photo'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'web' => [ "type" => 'text', "label" => trans('staff::user.label.web'), "placeholder" => trans('staff::user.placeholder.web'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'permissions' => [ "type" => 'html_editor', "label" => trans('staff::user.label.permissions'), "placeholder" => trans('staff::user.placeholder.permissions'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'email_verified_at' => [ "type" => 'radios', "label" => trans('staff::user.label.email_verified_at'), "placeholder" => trans('staff::user.placeholder.email_verified_at'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'last_login' => [ "type" => 'date_time_picker', "label" => trans('staff::user.label.last_login'), "placeholder" => trans('staff::user.placeholder.last_login'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'team_id' => [ "type" => 'numeric', "label" => trans('staff::user.label.team_id'), "placeholder" => trans('staff::user.placeholder.team_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }