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('review::review.label.name'), "placeholder" => trans('review::review.placeholder.name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'client_id' => [ "type" => 'numeric', "label" => trans('review::review.label.client_id'), "placeholder" => trans('review::review.placeholder.client_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'help_details' => [ "type" => 'text', "label" => trans('review::review.label.help_details'), "placeholder" => trans('review::review.placeholder.help_details'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'experience_rate' => [ "type" => 'numeric', "label" => trans('review::review.label.experience_rate'), "placeholder" => trans('review::review.placeholder.experience_rate'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'knowledge_localarea_rate' => [ "type" => 'numeric', "label" => trans('review::review.label.knowledge_localarea_rate'), "placeholder" => trans('review::review.placeholder.knowledge_localarea_rate'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'finding_home_rate' => [ "type" => 'numeric', "label" => trans('review::review.label.finding_home_rate'), "placeholder" => trans('review::review.placeholder.finding_home_rate'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'market_value' => [ "type" => 'numeric', "label" => trans('review::review.label.market_value'), "placeholder" => trans('review::review.placeholder.market_value'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'closingprocess_rate' => [ "type" => 'numeric', "label" => trans('review::review.label.closingprocess_rate'), "placeholder" => trans('review::review.placeholder.closingprocess_rate'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'best_price' => [ "type" => 'numeric', "label" => trans('review::review.label.best_price'), "placeholder" => trans('review::review.placeholder.best_price'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'time_attension' => [ "type" => 'numeric', "label" => trans('review::review.label.time_attension'), "placeholder" => trans('review::review.placeholder.time_attension'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'description' => [ "type" => 'text', "label" => trans('review::review.label.description'), "placeholder" => trans('review::review.placeholder.description'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'email' => [ "type" => 'text', "label" => trans('review::review.label.email'), "placeholder" => trans('review::review.placeholder.email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }