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' => [ 'type' => [ "type" => 'radios', "label" => trans('realestate::category.label.type'), "placeholder" => trans('realestate::category.placeholder.type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'name' => [ "type" => 'text', "label" => trans('realestate::category.label.name'), "placeholder" => trans('realestate::category.placeholder.name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'description' => [ "type" => 'text', "label" => trans('realestate::category.label.description'), "placeholder" => trans('realestate::category.placeholder.description'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'bedroomss' => [ "type" => 'numeric', "label" => trans('realestate::category.label.bedroomss'), "placeholder" => trans('realestate::category.placeholder.bedroomss'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'bathrooms' => [ "type" => 'numeric', "label" => trans('realestate::category.label.bathrooms'), "placeholder" => trans('realestate::category.placeholder.bathrooms'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'land_area' => [ "type" => 'numeric', "label" => trans('realestate::category.label.land_area'), "placeholder" => trans('realestate::category.placeholder.land_area'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'buildup_area' => [ "type" => 'numeric', "label" => trans('realestate::category.label.buildup_area'), "placeholder" => trans('realestate::category.placeholder.buildup_area'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'furnished' => [ "type" => 'numeric', "label" => trans('realestate::category.label.furnished'), "placeholder" => trans('realestate::category.placeholder.furnished'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'meta_title' => [ "type" => 'text', "label" => trans('realestate::category.label.meta_title'), "placeholder" => trans('realestate::category.placeholder.meta_title'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'meta_description' => [ "type" => 'text', "label" => trans('realestate::category.label.meta_description'), "placeholder" => trans('realestate::category.placeholder.meta_description'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'meta_keyword' => [ "type" => 'text', "label" => trans('realestate::category.label.meta_keyword'), "placeholder" => trans('realestate::category.placeholder.meta_keyword'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }