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