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" => [], ], ], 'unito' => [ "type" => 'text', "label" => trans('realestate::property.label.unito'), "placeholder" => trans('realestate::property.placeholder.unito'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'country_id' => [ "type" => 'select', "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" => 'select', "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" => 'select', "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" => 'select', "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" => 'select', "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" => 'select', "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" => 'textarea', "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" => [], ], ], 'year_built' => [ "type" => 'date_picker', "label" => trans('realestate::property.label.year_built'), "placeholder" => trans('realestate::property.placeholder.year_built'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'rent_frequency' => [ "type" => 'select', "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" => [], ], ], '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" => 'select', "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" => 'select', "label" => trans('realestate::property.label.landarea_type'), "placeholder" => trans('realestate::property.placeholder.landarea_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'floor_nos' => [ "type" => 'numeric', "label" => trans('realestate::property.label.floor_nos'), "placeholder" => trans('realestate::property.placeholder.floor_nos'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'parking' => [ "type" => 'numeric', "label" => trans('realestate::property.label.parking'), "placeholder" => trans('realestate::property.placeholder.parking'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'furnishing' => [ "type" => 'select', "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" => 'textarea', "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" => [], ], ], '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" => 'images', "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" => [], ], ], '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" => 'select', "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" => 'select', "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" => 'select', "label" => trans('realestate::property.label.build_status'), "placeholder" => trans('realestate::property.placeholder.build_status'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'lead_type' => [ "type" => 'select', "label" => trans('realestate::property.label.lead_type'), "placeholder" => trans('realestate::property.placeholder.lead_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'owner' => [ "type" => 'text', "label" => trans('realestate::property.label.owner'), "placeholder" => trans('realestate::property.placeholder.owner'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'phone' => [ "type" => 'text', "label" => trans('realestate::property.label.phone'), "placeholder" => trans('realestate::property.placeholder.phone'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'email' => [ "type" => 'text', "label" => trans('realestate::property.label.email'), "placeholder" => trans('realestate::property.placeholder.email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }