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::property.label.refno'), "placeholder" => trans('realestate::property.placeholder.refno'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact_id' => [ "type" => 'numeric', "label" => trans('realestate::property.label.contact_id'), "placeholder" => trans('realestate::property.placeholder.contact_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'agent_id' => [ "type" => 'numeric', "label" => trans('realestate::property.label.agent_id'), "placeholder" => trans('realestate::property.placeholder.agent_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'country_id' => [ "type" => 'numeric', "label" => trans('realestate::property.label.country_id'), "placeholder" => trans('realestate::property.placeholder.country_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'state_id' => [ "type" => 'numeric', "label" => trans('realestate::property.label.state_id'), "placeholder" => trans('realestate::property.placeholder.state_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'district_id' => [ "type" => 'numeric', "label" => trans('realestate::property.label.district_id'), "placeholder" => trans('realestate::property.placeholder.district_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'city_id' => [ "type" => 'numeric', "label" => trans('realestate::property.label.city_id'), "placeholder" => trans('realestate::property.placeholder.city_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'location_id' => [ "type" => 'numeric', "label" => trans('realestate::property.label.location_id'), "placeholder" => trans('realestate::property.placeholder.location_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'category_id' => [ "type" => 'numeric', "label" => trans('realestate::property.label.category_id'), "placeholder" => trans('realestate::property.placeholder.category_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'title' => [ "type" => 'text', "label" => trans('realestate::property.label.title'), "placeholder" => trans('realestate::property.placeholder.title'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'description' => [ "type" => 'text', "label" => trans('realestate::property.label.description'), "placeholder" => trans('realestate::property.placeholder.description'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'price' => [ "type" => 'numeric', "label" => trans('realestate::property.label.price'), "placeholder" => trans('realestate::property.placeholder.price'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'rent_frequency' => [ "type" => 'radios', "label" => trans('realestate::property.label.rent_frequency'), "placeholder" => trans('realestate::property.placeholder.rent_frequency'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'bedrooms' => [ "type" => 'numeric', "label" => trans('realestate::property.label.bedrooms'), "placeholder" => trans('realestate::property.placeholder.bedrooms'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'bathrooms' => [ "type" => 'numeric', "label" => trans('realestate::property.label.bathrooms'), "placeholder" => trans('realestate::property.placeholder.bathrooms'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'garages' => [ "type" => 'numeric', "label" => trans('realestate::property.label.garages'), "placeholder" => trans('realestate::property.placeholder.garages'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'garage_size' => [ "type" => 'decimal', "label" => trans('realestate::property.label.garage_size'), "placeholder" => trans('realestate::property.placeholder.garage_size'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'buildup_area' => [ "type" => 'decimal', "label" => trans('realestate::property.label.buildup_area'), "placeholder" => trans('realestate::property.placeholder.buildup_area'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'buildarea_type' => [ "type" => 'radios', "label" => trans('realestate::property.label.buildarea_type'), "placeholder" => trans('realestate::property.placeholder.buildarea_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'land_area' => [ "type" => 'decimal', "label" => trans('realestate::property.label.land_area'), "placeholder" => trans('realestate::property.placeholder.land_area'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'landarea_type' => [ "type" => 'radios', "label" => trans('realestate::property.label.landarea_type'), "placeholder" => trans('realestate::property.placeholder.landarea_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'furnishing' => [ "type" => 'text', "label" => trans('realestate::property.label.furnishing'), "placeholder" => trans('realestate::property.placeholder.furnishing'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'features' => [ "type" => 'text', "label" => trans('realestate::property.label.features'), "placeholder" => trans('realestate::property.placeholder.features'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'amenities' => [ "type" => 'text', "label" => trans('realestate::property.label.amenities'), "placeholder" => trans('realestate::property.placeholder.amenities'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'portals' => [ "type" => 'text', "label" => trans('realestate::property.label.portals'), "placeholder" => trans('realestate::property.placeholder.portals'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'address' => [ "type" => 'text', "label" => trans('realestate::property.label.address'), "placeholder" => trans('realestate::property.placeholder.address'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'locality' => [ "type" => 'text', "label" => trans('realestate::property.label.locality'), "placeholder" => trans('realestate::property.placeholder.locality'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'zip_code' => [ "type" => 'numeric', "label" => trans('realestate::property.label.zip_code'), "placeholder" => trans('realestate::property.placeholder.zip_code'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'landmarks' => [ "type" => 'text', "label" => trans('realestate::property.label.landmarks'), "placeholder" => trans('realestate::property.placeholder.landmarks'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'hot' => [ "type" => 'numeric', "label" => trans('realestate::property.label.hot'), "placeholder" => trans('realestate::property.placeholder.hot'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'visibility' => [ "type" => 'radios', "label" => trans('realestate::property.label.visibility'), "placeholder" => trans('realestate::property.placeholder.visibility'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'images' => [ "type" => 'text', "label" => trans('realestate::property.label.images'), "placeholder" => trans('realestate::property.placeholder.images'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'video_link' => [ "type" => 'text', "label" => trans('realestate::property.label.video_link'), "placeholder" => trans('realestate::property.placeholder.video_link'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'video360' => [ "type" => 'text', "label" => trans('realestate::property.label.video360'), "placeholder" => trans('realestate::property.placeholder.video360'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'expire_date' => [ "type" => 'date_picker', "label" => trans('realestate::property.label.expire_date'), "placeholder" => trans('realestate::property.placeholder.expire_date'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'source' => [ "type" => 'text', "label" => trans('realestate::property.label.source'), "placeholder" => trans('realestate::property.placeholder.source'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'property_for' => [ "type" => 'radios', "label" => trans('realestate::property.label.property_for'), "placeholder" => trans('realestate::property.placeholder.property_for'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'prop_status' => [ "type" => 'text', "label" => trans('realestate::property.label.prop_status'), "placeholder" => trans('realestate::property.placeholder.prop_status'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'build_status' => [ "type" => 'radios', "label" => trans('realestate::property.label.build_status'), "placeholder" => trans('realestate::property.placeholder.build_status'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }