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