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' => [ 'refno' => [ "type" => 'text', "label" => trans('realestate::requirement.label.refno'), "placeholder" => trans('realestate::requirement.placeholder.refno'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'country_id' => [ "type" => 'select', "label" => trans('realestate::requirement.label.country_id'), "placeholder" => trans('realestate::requirement.placeholder.country_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'state_id' => [ "type" => 'select', "label" => trans('realestate::requirement.label.state_id'), "placeholder" => trans('realestate::requirement.placeholder.state_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'district_id' => [ "type" => 'select', "label" => trans('realestate::requirement.label.district_id'), "placeholder" => trans('realestate::requirement.placeholder.district_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'city_id' => [ "type" => 'select', "label" => trans('realestate::requirement.label.city_id'), "placeholder" => trans('realestate::requirement.placeholder.city_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'location_id' => [ "type" => 'select', "label" => trans('realestate::requirement.label.location_id'), "placeholder" => trans('realestate::requirement.placeholder.location_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'category_id' => [ "type" => 'select', "label" => trans('realestate::requirement.label.category_id'), "placeholder" => trans('realestate::requirement.placeholder.category_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'title' => [ "type" => 'text', "label" => trans('realestate::requirement.label.title'), "placeholder" => trans('realestate::requirement.placeholder.title'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'description' => [ "type" => 'textarea', "label" => trans('realestate::requirement.label.description'), "placeholder" => trans('realestate::requirement.placeholder.description'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'date' => [ "type" => 'date_picker', "label" => trans('realestate::requirement.label.date'), "placeholder" => trans('realestate::requirement.placeholder.date'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'lead_type' => [ "type" => 'select', "label" => trans('realestate::requirement.label.lead_type'), "placeholder" => trans('realestate::requirement.placeholder.lead_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'finance' => [ "type" => 'select', "label" => trans('realestate::requirement.label.finance'), "placeholder" => trans('realestate::requirement.placeholder.finance'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'priority' => [ "type" => 'select', "label" => trans('realestate::requirement.label.priority'), "placeholder" => trans('realestate::requirement.placeholder.priority'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'owner' => [ "type" => 'text', "label" => trans('realestate::requirement.label.owner'), "placeholder" => trans('realestate::requirement.placeholder.owner'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'phone' => [ "type" => 'tel', "label" => trans('realestate::requirement.label.phone'), "placeholder" => trans('realestate::requirement.placeholder.phone'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'email' => [ "type" => 'email', "label" => trans('realestate::requirement.label.email'), "placeholder" => trans('realestate::requirement.placeholder.email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'source' => [ "type" => 'text', "label" => trans('realestate::requirement.label.source'), "placeholder" => trans('realestate::requirement.placeholder.source'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'hot' => [ "type" => 'checkboxes', "label" => trans('realestate::requirement.label.hot'), "placeholder" => trans('realestate::requirement.placeholder.hot'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'share_lead' => [ "type" => 'checkboxes', "label" => trans('realestate::requirement.label.share_lead'), "placeholder" => trans('realestate::requirement.placeholder.share_lead'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'min_beds' => [ "type" => 'numeric', "label" => trans('realestate::requirement.label.min_beds'), "placeholder" => trans('realestate::requirement.placeholder.min_beds'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'max_beds' => [ "type" => 'numeric', "label" => trans('realestate::requirement.label.max_beds'), "placeholder" => trans('realestate::requirement.placeholder.max_beds'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'min_price' => [ "type" => 'numeric', "label" => trans('realestate::requirement.label.min_price'), "placeholder" => trans('realestate::requirement.placeholder.min_price'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'max_price' => [ "type" => 'numeric', "label" => trans('realestate::requirement.label.max_price'), "placeholder" => trans('realestate::requirement.placeholder.max_price'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'min_buildarea' => [ "type" => 'decimal', "label" => trans('realestate::requirement.label.min_buildarea'), "placeholder" => trans('realestate::requirement.placeholder.min_buildarea'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'max_buildarea' => [ "type" => 'decimal', "label" => trans('realestate::requirement.label.max_buildarea'), "placeholder" => trans('realestate::requirement.placeholder.max_buildarea'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'buildarea_typ' => [ "type" => 'select', "label" => trans('realestate::requirement.label.buildarea_typ'), "placeholder" => trans('realestate::requirement.placeholder.buildarea_typ'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'min_landarea' => [ "type" => 'decimal', "label" => trans('realestate::requirement.label.min_landarea'), "placeholder" => trans('realestate::requirement.placeholder.min_landarea'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'max_landarea' => [ "type" => 'decimal', "label" => trans('realestate::requirement.label.max_landarea'), "placeholder" => trans('realestate::requirement.placeholder.max_landarea'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'landarea_type' => [ "type" => 'select', "label" => trans('realestate::requirement.label.landarea_type'), "placeholder" => trans('realestate::requirement.placeholder.landarea_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'status' => [ "type" => 'select', "label" => trans('realestate::requirement.label.status'), "placeholder" => trans('realestate::requirement.placeholder.status'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'sub_status' => [ "type" => 'text', "label" => trans('realestate::requirement.label.sub_status'), "placeholder" => trans('realestate::requirement.placeholder.sub_status'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }