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' => [ 'fname' => [ "type" => 'text', "label" => trans('influencer::influencer.label.fname'), "placeholder" => trans('influencer::influencer.placeholder.fname'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'lname' => [ "type" => 'text', "label" => trans('influencer::influencer.label.lname'), "placeholder" => trans('influencer::influencer.placeholder.lname'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'gender' => [ "type" => 'text', "label" => trans('influencer::influencer.label.gender'), "placeholder" => trans('influencer::influencer.placeholder.gender'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'dob' => [ "type" => 'date_picker', "label" => trans('influencer::influencer.label.dob'), "placeholder" => trans('influencer::influencer.placeholder.dob'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'country_id' => [ "type" => 'numeric', "label" => trans('influencer::influencer.label.country_id'), "placeholder" => trans('influencer::influencer.placeholder.country_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'state_id' => [ "type" => 'numeric', "label" => trans('influencer::influencer.label.state_id'), "placeholder" => trans('influencer::influencer.placeholder.state_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'city_id' => [ "type" => 'numeric', "label" => trans('influencer::influencer.label.city_id'), "placeholder" => trans('influencer::influencer.placeholder.city_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'zipcode' => [ "type" => 'text', "label" => trans('influencer::influencer.label.zipcode'), "placeholder" => trans('influencer::influencer.placeholder.zipcode'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'street' => [ "type" => 'text', "label" => trans('influencer::influencer.label.street'), "placeholder" => trans('influencer::influencer.placeholder.street'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'street_no' => [ "type" => 'text', "label" => trans('influencer::influencer.label.street_no'), "placeholder" => trans('influencer::influencer.placeholder.street_no'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'profile' => [ "type" => 'text', "label" => trans('influencer::influencer.label.profile'), "placeholder" => trans('influencer::influencer.placeholder.profile'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'profile_picture' => [ "type" => 'image', "label" => trans('influencer::influencer.label.profile_picture'), "placeholder" => trans('influencer::influencer.placeholder.profile_picture'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'education' => [ "type" => 'html_editor', "label" => trans('influencer::influencer.label.education'), "placeholder" => trans('influencer::influencer.placeholder.education'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'experience' => [ "type" => 'html_editor', "label" => trans('influencer::influencer.label.experience'), "placeholder" => trans('influencer::influencer.placeholder.experience'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'skill' => [ "type" => 'html_editor', "label" => trans('influencer::influencer.label.skill'), "placeholder" => trans('influencer::influencer.placeholder.skill'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }