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' => [ 'opportunity_id' => [ "type" => 'numeric', "label" => trans('opportunity::offers.label.opportunity_id'), "placeholder" => trans('opportunity::offers.placeholder.opportunity_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'agent_id' => [ "type" => 'numeric', "label" => trans('opportunity::offers.label.agent_id'), "placeholder" => trans('opportunity::offers.placeholder.agent_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'listing_id' => [ "type" => 'numeric', "label" => trans('opportunity::offers.label.listing_id'), "placeholder" => trans('opportunity::offers.placeholder.listing_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'viewing_id' => [ "type" => 'numeric', "label" => trans('opportunity::offers.label.viewing_id'), "placeholder" => trans('opportunity::offers.placeholder.viewing_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'title' => [ "type" => 'text', "label" => trans('opportunity::offers.label.title'), "placeholder" => trans('opportunity::offers.placeholder.title'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'priority' => [ "type" => 'text', "label" => trans('opportunity::offers.label.priority'), "placeholder" => trans('opportunity::offers.placeholder.priority'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'start_date' => [ "type" => 'date_time_picker', "label" => trans('opportunity::offers.label.start_date'), "placeholder" => trans('opportunity::offers.placeholder.start_date'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'description' => [ "type" => 'text', "label" => trans('opportunity::offers.label.description'), "placeholder" => trans('opportunity::offers.placeholder.description'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'feedbacks' => [ "type" => 'text', "label" => trans('opportunity::offers.label.feedbacks'), "placeholder" => trans('opportunity::offers.placeholder.feedbacks'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'fb_community' => [ "type" => 'numeric', "label" => trans('opportunity::offers.label.fb_community'), "placeholder" => trans('opportunity::offers.placeholder.fb_community'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'fb_location' => [ "type" => 'numeric', "label" => trans('opportunity::offers.label.fb_location'), "placeholder" => trans('opportunity::offers.placeholder.fb_location'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'fb_floor' => [ "type" => 'numeric', "label" => trans('opportunity::offers.label.fb_floor'), "placeholder" => trans('opportunity::offers.placeholder.fb_floor'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'fb_view' => [ "type" => 'numeric', "label" => trans('opportunity::offers.label.fb_view'), "placeholder" => trans('opportunity::offers.placeholder.fb_view'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'fb_floor_plan_layout' => [ "type" => 'numeric', "label" => trans('opportunity::offers.label.fb_floor_plan_layout'), "placeholder" => trans('opportunity::offers.placeholder.fb_floor_plan_layout'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'fb_area_sq_ft' => [ "type" => 'numeric', "label" => trans('opportunity::offers.label.fb_area_sq_ft'), "placeholder" => trans('opportunity::offers.placeholder.fb_area_sq_ft'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'fb_quality_condition' => [ "type" => 'numeric', "label" => trans('opportunity::offers.label.fb_quality_condition'), "placeholder" => trans('opportunity::offers.placeholder.fb_quality_condition'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'fb_price' => [ "type" => 'numeric', "label" => trans('opportunity::offers.label.fb_price'), "placeholder" => trans('opportunity::offers.placeholder.fb_price'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'fb_amenities_facilities' => [ "type" => 'numeric', "label" => trans('opportunity::offers.label.fb_amenities_facilities'), "placeholder" => trans('opportunity::offers.placeholder.fb_amenities_facilities'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'fb_parking' => [ "type" => 'numeric', "label" => trans('opportunity::offers.label.fb_parking'), "placeholder" => trans('opportunity::offers.placeholder.fb_parking'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'fb_ac_type' => [ "type" => 'numeric', "label" => trans('opportunity::offers.label.fb_ac_type'), "placeholder" => trans('opportunity::offers.placeholder.fb_ac_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'fb_service_charge' => [ "type" => 'numeric', "label" => trans('opportunity::offers.label.fb_service_charge'), "placeholder" => trans('opportunity::offers.placeholder.fb_service_charge'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'fb_furniture_quality_condition' => [ "type" => 'numeric', "label" => trans('opportunity::offers.label.fb_furniture_quality_condition'), "placeholder" => trans('opportunity::offers.placeholder.fb_furniture_quality_condition'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'fb_appliances_quality_condition' => [ "type" => 'numeric', "label" => trans('opportunity::offers.label.fb_appliances_quality_condition'), "placeholder" => trans('opportunity::offers.placeholder.fb_appliances_quality_condition'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'property_type' => [ "type" => 'radios', "label" => trans('opportunity::offers.label.property_type'), "placeholder" => trans('opportunity::offers.placeholder.property_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'category_id' => [ "type" => 'numeric', "label" => trans('opportunity::offers.label.category_id'), "placeholder" => trans('opportunity::offers.placeholder.category_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'beds' => [ "type" => 'text', "label" => trans('opportunity::offers.label.beds'), "placeholder" => trans('opportunity::offers.placeholder.beds'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'location_id' => [ "type" => 'numeric', "label" => trans('opportunity::offers.label.location_id'), "placeholder" => trans('opportunity::offers.placeholder.location_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'sublocation_id' => [ "type" => 'numeric', "label" => trans('opportunity::offers.label.sublocation_id'), "placeholder" => trans('opportunity::offers.placeholder.sublocation_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'property_id' => [ "type" => 'numeric', "label" => trans('opportunity::offers.label.property_id'), "placeholder" => trans('opportunity::offers.placeholder.property_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'price' => [ "type" => 'numeric', "label" => trans('opportunity::offers.label.price'), "placeholder" => trans('opportunity::offers.placeholder.price'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'baths' => [ "type" => 'text', "label" => trans('opportunity::offers.label.baths'), "placeholder" => trans('opportunity::offers.placeholder.baths'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'plot' => [ "type" => 'text', "label" => trans('opportunity::offers.label.plot'), "placeholder" => trans('opportunity::offers.placeholder.plot'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'bua' => [ "type" => 'numeric', "label" => trans('opportunity::offers.label.bua'), "placeholder" => trans('opportunity::offers.placeholder.bua'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'furnished' => [ "type" => 'text', "label" => trans('opportunity::offers.label.furnished'), "placeholder" => trans('opportunity::offers.placeholder.furnished'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'view' => [ "type" => 'text', "label" => trans('opportunity::offers.label.view'), "placeholder" => trans('opportunity::offers.placeholder.view'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'parking' => [ "type" => 'numeric', "label" => trans('opportunity::offers.label.parking'), "placeholder" => trans('opportunity::offers.placeholder.parking'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'unit' => [ "type" => 'text', "label" => trans('opportunity::offers.label.unit'), "placeholder" => trans('opportunity::offers.placeholder.unit'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }