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' => [ 'category_id' => [ "type" => 'numeric', "label" => trans('listings::listing.label.category_id'), "placeholder" => trans('listings::listing.placeholder.category_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact_id' => [ "type" => 'numeric', "label" => trans('listings::listing.label.contact_id'), "placeholder" => trans('listings::listing.placeholder.contact_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'agent_id' => [ "type" => 'numeric', "label" => trans('listings::listing.label.agent_id'), "placeholder" => trans('listings::listing.placeholder.agent_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'teamlead_id' => [ "type" => 'numeric', "label" => trans('listings::listing.label.teamlead_id'), "placeholder" => trans('listings::listing.placeholder.teamlead_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'hot' => [ "type" => 'checkboxes', "label" => trans('listings::listing.label.hot'), "placeholder" => trans('listings::listing.placeholder.hot'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'exclusive' => [ "type" => 'checkboxes', "label" => trans('listings::listing.label.exclusive'), "placeholder" => trans('listings::listing.placeholder.exclusive'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'name' => [ "type" => 'text', "label" => trans('listings::listing.label.name'), "placeholder" => trans('listings::listing.placeholder.name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'ref' => [ "type" => 'text', "label" => trans('listings::listing.label.ref'), "placeholder" => trans('listings::listing.placeholder.ref'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'unit' => [ "type" => 'text', "label" => trans('listings::listing.label.unit'), "placeholder" => trans('listings::listing.placeholder.unit'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'roi' => [ "type" => 'decimal', "label" => trans('listings::listing.label.roi'), "placeholder" => trans('listings::listing.placeholder.roi'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'roi_aed' => [ "type" => 'decimal', "label" => trans('listings::listing.label.roi_aed'), "placeholder" => trans('listings::listing.placeholder.roi_aed'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'country_id' => [ "type" => 'numeric', "label" => trans('listings::listing.label.country_id'), "placeholder" => trans('listings::listing.placeholder.country_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'state_id' => [ "type" => 'numeric', "label" => trans('listings::listing.label.state_id'), "placeholder" => trans('listings::listing.placeholder.state_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'location_id' => [ "type" => 'numeric', "label" => trans('listings::listing.label.location_id'), "placeholder" => trans('listings::listing.placeholder.location_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'sublocation_id' => [ "type" => 'numeric', "label" => trans('listings::listing.label.sublocation_id'), "placeholder" => trans('listings::listing.placeholder.sublocation_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'property_id' => [ "type" => 'numeric', "label" => trans('listings::listing.label.property_id'), "placeholder" => trans('listings::listing.placeholder.property_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'beds' => [ "type" => 'text', "label" => trans('listings::listing.label.beds'), "placeholder" => trans('listings::listing.placeholder.beds'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'fitted' => [ "type" => 'numeric', "label" => trans('listings::listing.label.fitted'), "placeholder" => trans('listings::listing.placeholder.fitted'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'building_type' => [ "type" => 'text', "label" => trans('listings::listing.label.building_type'), "placeholder" => trans('listings::listing.placeholder.building_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'handover_date' => [ "type" => 'date_picker', "label" => trans('listings::listing.label.handover_date'), "placeholder" => trans('listings::listing.placeholder.handover_date'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'baths' => [ "type" => 'text', "label" => trans('listings::listing.label.baths'), "placeholder" => trans('listings::listing.placeholder.baths'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'furnished' => [ "type" => 'text', "label" => trans('listings::listing.label.furnished'), "placeholder" => trans('listings::listing.placeholder.furnished'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'view' => [ "type" => 'text', "label" => trans('listings::listing.label.view'), "placeholder" => trans('listings::listing.placeholder.view'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'bua' => [ "type" => 'numeric', "label" => trans('listings::listing.label.bua'), "placeholder" => trans('listings::listing.placeholder.bua'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'price' => [ "type" => 'numeric', "label" => trans('listings::listing.label.price'), "placeholder" => trans('listings::listing.placeholder.price'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'interest_rate' => [ "type" => 'numeric', "label" => trans('listings::listing.label.interest_rate'), "placeholder" => trans('listings::listing.placeholder.interest_rate'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'down_payment' => [ "type" => 'decimal', "label" => trans('listings::listing.label.down_payment'), "placeholder" => trans('listings::listing.placeholder.down_payment'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'emi_years' => [ "type" => 'numeric', "label" => trans('listings::listing.label.emi_years'), "placeholder" => trans('listings::listing.placeholder.emi_years'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'emi' => [ "type" => 'decimal', "label" => trans('listings::listing.label.emi'), "placeholder" => trans('listings::listing.placeholder.emi'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'est_rental' => [ "type" => 'decimal', "label" => trans('listings::listing.label.est_rental'), "placeholder" => trans('listings::listing.placeholder.est_rental'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'original_price' => [ "type" => 'text', "label" => trans('listings::listing.label.original_price'), "placeholder" => trans('listings::listing.placeholder.original_price'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'plot' => [ "type" => 'text', "label" => trans('listings::listing.label.plot'), "placeholder" => trans('listings::listing.placeholder.plot'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'units' => [ "type" => 'select', "label" => trans('listings::listing.label.units'), "placeholder" => trans('listings::listing.placeholder.units'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'currency' => [ "type" => 'text', "label" => trans('listings::listing.label.currency'), "placeholder" => trans('listings::listing.placeholder.currency'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'poa' => [ "type" => 'numeric', "label" => trans('listings::listing.label.poa'), "placeholder" => trans('listings::listing.placeholder.poa'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'frequency' => [ "type" => 'select', "label" => trans('listings::listing.label.frequency'), "placeholder" => trans('listings::listing.placeholder.frequency'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'cheques' => [ "type" => 'numeric', "label" => trans('listings::listing.label.cheques'), "placeholder" => trans('listings::listing.placeholder.cheques'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'parking' => [ "type" => 'numeric', "label" => trans('listings::listing.label.parking'), "placeholder" => trans('listings::listing.placeholder.parking'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'description' => [ "type" => 'text', "label" => trans('listings::listing.label.description'), "placeholder" => trans('listings::listing.placeholder.description'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'documents' => [ "type" => 'files', "label" => trans('listings::listing.label.documents'), "placeholder" => trans('listings::listing.placeholder.documents'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'photos' => [ "type" => 'images', "label" => trans('listings::listing.label.photos'), "placeholder" => trans('listings::listing.placeholder.photos'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'floor_plans' => [ "type" => 'text', "label" => trans('listings::listing.label.floor_plans'), "placeholder" => trans('listings::listing.placeholder.floor_plans'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'commission' => [ "type" => 'decimal', "label" => trans('listings::listing.label.commission'), "placeholder" => trans('listings::listing.placeholder.commission'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'commission_aed' => [ "type" => 'decimal', "label" => trans('listings::listing.label.commission_aed'), "placeholder" => trans('listings::listing.placeholder.commission_aed'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'deposit' => [ "type" => 'decimal', "label" => trans('listings::listing.label.deposit'), "placeholder" => trans('listings::listing.placeholder.deposit'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'deposit_aed' => [ "type" => 'decimal', "label" => trans('listings::listing.label.deposit_aed'), "placeholder" => trans('listings::listing.placeholder.deposit_aed'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'portals' => [ "type" => 'text', "label" => trans('listings::listing.label.portals'), "placeholder" => trans('listings::listing.placeholder.portals'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'other_medias' => [ "type" => 'text', "label" => trans('listings::listing.label.other_medias'), "placeholder" => trans('listings::listing.placeholder.other_medias'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'features' => [ "type" => 'text', "label" => trans('listings::listing.label.features'), "placeholder" => trans('listings::listing.placeholder.features'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'amenities' => [ "type" => 'text', "label" => trans('listings::listing.label.amenities'), "placeholder" => trans('listings::listing.placeholder.amenities'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'area_informations' => [ "type" => 'text', "label" => trans('listings::listing.label.area_informations'), "placeholder" => trans('listings::listing.placeholder.area_informations'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'featured' => [ "type" => 'select', "label" => trans('listings::listing.label.featured'), "placeholder" => trans('listings::listing.placeholder.featured'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'dewa_no' => [ "type" => 'text', "label" => trans('listings::listing.label.dewa_no'), "placeholder" => trans('listings::listing.placeholder.dewa_no'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'str' => [ "type" => 'text', "label" => trans('listings::listing.label.str'), "placeholder" => trans('listings::listing.placeholder.str'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'source_listing' => [ "type" => 'text', "label" => trans('listings::listing.label.source_listing'), "placeholder" => trans('listings::listing.placeholder.source_listing'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'next_available' => [ "type" => 'date_picker', "label" => trans('listings::listing.label.next_available'), "placeholder" => trans('listings::listing.placeholder.next_available'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'notes' => [ "type" => 'text', "label" => trans('listings::listing.label.notes'), "placeholder" => trans('listings::listing.placeholder.notes'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'additional_info' => [ "type" => 'text', "label" => trans('listings::listing.label.additional_info'), "placeholder" => trans('listings::listing.placeholder.additional_info'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'key_location' => [ "type" => 'text', "label" => trans('listings::listing.label.key_location'), "placeholder" => trans('listings::listing.placeholder.key_location'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'tenanted' => [ "type" => 'select', "label" => trans('listings::listing.label.tenanted'), "placeholder" => trans('listings::listing.placeholder.tenanted'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'rented_at' => [ "type" => 'text', "label" => trans('listings::listing.label.rented_at'), "placeholder" => trans('listings::listing.placeholder.rented_at'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'rented_until' => [ "type" => 'date_picker', "label" => trans('listings::listing.label.rented_until'), "placeholder" => trans('listings::listing.placeholder.rented_until'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'maintenance_fee' => [ "type" => 'text', "label" => trans('listings::listing.label.maintenance_fee'), "placeholder" => trans('listings::listing.placeholder.maintenance_fee'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'price_sqft' => [ "type" => 'decimal', "label" => trans('listings::listing.label.price_sqft'), "placeholder" => trans('listings::listing.placeholder.price_sqft'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'meta_keyword' => [ "type" => 'text', "label" => trans('listings::listing.label.meta_keyword'), "placeholder" => trans('listings::listing.placeholder.meta_keyword'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'meta_description' => [ "type" => 'text', "label" => trans('listings::listing.label.meta_description'), "placeholder" => trans('listings::listing.placeholder.meta_description'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'viewings' => [ "type" => 'numeric', "label" => trans('listings::listing.label.viewings'), "placeholder" => trans('listings::listing.placeholder.viewings'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'published' => [ "type" => 'select', "label" => trans('listings::listing.label.published'), "placeholder" => trans('listings::listing.placeholder.published'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'owner_signed' => [ "type" => 'select', "label" => trans('listings::listing.label.owner_signed'), "placeholder" => trans('listings::listing.placeholder.owner_signed'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'property_type' => [ "type" => 'text', "label" => trans('listings::listing.label.property_type'), "placeholder" => trans('listings::listing.placeholder.property_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'distributed_area' => [ "type" => 'select', "label" => trans('listings::listing.label.distributed_area'), "placeholder" => trans('listings::listing.placeholder.distributed_area'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'property_status' => [ "type" => 'select', "label" => trans('listings::listing.label.property_status'), "placeholder" => trans('listings::listing.placeholder.property_status'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'rera' => [ "type" => 'text', "label" => trans('listings::listing.label.rera'), "placeholder" => trans('listings::listing.placeholder.rera'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'referal_agents' => [ "type" => 'text', "label" => trans('listings::listing.label.referal_agents'), "placeholder" => trans('listings::listing.placeholder.referal_agents'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'referal_percentage' => [ "type" => 'numeric', "label" => trans('listings::listing.label.referal_percentage'), "placeholder" => trans('listings::listing.placeholder.referal_percentage'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'property_use' => [ "type" => 'select', "label" => trans('listings::listing.label.property_use'), "placeholder" => trans('listings::listing.placeholder.property_use'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'developer_unit' => [ "type" => 'text', "label" => trans('listings::listing.label.developer_unit'), "placeholder" => trans('listings::listing.placeholder.developer_unit'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'published_date' => [ "type" => 'date_picker', "label" => trans('listings::listing.label.published_date'), "placeholder" => trans('listings::listing.placeholder.published_date'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'lat' => [ "type" => 'text', "label" => trans('listings::listing.label.lat'), "placeholder" => trans('listings::listing.placeholder.lat'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'lng' => [ "type" => 'text', "label" => trans('listings::listing.label.lng'), "placeholder" => trans('listings::listing.placeholder.lng'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }