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' => [ 'buyer_id' => [ "type" => 'numeric', "label" => trans('deal::deal.label.buyer_id'), "placeholder" => trans('deal::deal.placeholder.buyer_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'buyer_type' => [ "type" => 'radios', "label" => trans('deal::deal.label.buyer_type'), "placeholder" => trans('deal::deal.placeholder.buyer_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'seller_id' => [ "type" => 'numeric', "label" => trans('deal::deal.label.seller_id'), "placeholder" => trans('deal::deal.placeholder.seller_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'seller_type' => [ "type" => 'radios', "label" => trans('deal::deal.label.seller_type'), "placeholder" => trans('deal::deal.placeholder.seller_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'category_id' => [ "type" => 'numeric', "label" => trans('deal::deal.label.category_id'), "placeholder" => trans('deal::deal.placeholder.category_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'listing_id' => [ "type" => 'numeric', "label" => trans('deal::deal.label.listing_id'), "placeholder" => trans('deal::deal.placeholder.listing_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'country_id' => [ "type" => 'numeric', "label" => trans('deal::deal.label.country_id'), "placeholder" => trans('deal::deal.placeholder.country_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'state_id' => [ "type" => 'numeric', "label" => trans('deal::deal.label.state_id'), "placeholder" => trans('deal::deal.placeholder.state_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'location_id' => [ "type" => 'numeric', "label" => trans('deal::deal.label.location_id'), "placeholder" => trans('deal::deal.placeholder.location_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'sublocation_id' => [ "type" => 'numeric', "label" => trans('deal::deal.label.sublocation_id'), "placeholder" => trans('deal::deal.placeholder.sublocation_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'property_id' => [ "type" => 'numeric', "label" => trans('deal::deal.label.property_id'), "placeholder" => trans('deal::deal.placeholder.property_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'ref' => [ "type" => 'text', "label" => trans('deal::deal.label.ref'), "placeholder" => trans('deal::deal.placeholder.ref'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'type' => [ "type" => 'radios', "label" => trans('deal::deal.label.type'), "placeholder" => trans('deal::deal.placeholder.type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'bua' => [ "type" => 'numeric', "label" => trans('deal::deal.label.bua'), "placeholder" => trans('deal::deal.placeholder.bua'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'plot' => [ "type" => 'text', "label" => trans('deal::deal.label.plot'), "placeholder" => trans('deal::deal.placeholder.plot'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'premises_no' => [ "type" => 'text', "label" => trans('deal::deal.label.premises_no'), "placeholder" => trans('deal::deal.placeholder.premises_no'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'price' => [ "type" => 'decimal', "label" => trans('deal::deal.label.price'), "placeholder" => trans('deal::deal.placeholder.price'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'payment_mode' => [ "type" => 'text', "label" => trans('deal::deal.label.payment_mode'), "placeholder" => trans('deal::deal.placeholder.payment_mode'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'deposit' => [ "type" => 'decimal', "label" => trans('deal::deal.label.deposit'), "placeholder" => trans('deal::deal.placeholder.deposit'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'deposit_percent' => [ "type" => 'text', "label" => trans('deal::deal.label.deposit_percent'), "placeholder" => trans('deal::deal.placeholder.deposit_percent'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'commission_buyer' => [ "type" => 'decimal', "label" => trans('deal::deal.label.commission_buyer'), "placeholder" => trans('deal::deal.placeholder.commission_buyer'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'commission_buyer_percent' => [ "type" => 'decimal', "label" => trans('deal::deal.label.commission_buyer_percent'), "placeholder" => trans('deal::deal.placeholder.commission_buyer_percent'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'commission_seller' => [ "type" => 'numeric', "label" => trans('deal::deal.label.commission_seller'), "placeholder" => trans('deal::deal.placeholder.commission_seller'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'commission_seller_percent' => [ "type" => 'numeric', "label" => trans('deal::deal.label.commission_seller_percent'), "placeholder" => trans('deal::deal.placeholder.commission_seller_percent'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'deal_date' => [ "type" => 'date_picker', "label" => trans('deal::deal.label.deal_date'), "placeholder" => trans('deal::deal.placeholder.deal_date'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'deal_est_date' => [ "type" => 'date_picker', "label" => trans('deal::deal.label.deal_est_date'), "placeholder" => trans('deal::deal.placeholder.deal_est_date'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'unit_no' => [ "type" => 'text', "label" => trans('deal::deal.label.unit_no'), "placeholder" => trans('deal::deal.placeholder.unit_no'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'subject_of_tenancy' => [ "type" => 'text', "label" => trans('deal::deal.label.subject_of_tenancy'), "placeholder" => trans('deal::deal.placeholder.subject_of_tenancy'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'period_of_tenancy' => [ "type" => 'text', "label" => trans('deal::deal.label.period_of_tenancy'), "placeholder" => trans('deal::deal.placeholder.period_of_tenancy'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'terms_of_payment' => [ "type" => 'text', "label" => trans('deal::deal.label.terms_of_payment'), "placeholder" => trans('deal::deal.placeholder.terms_of_payment'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'shared' => [ "type" => 'radios', "label" => trans('deal::deal.label.shared'), "placeholder" => trans('deal::deal.placeholder.shared'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'agency_name' => [ "type" => 'text', "label" => trans('deal::deal.label.agency_name'), "placeholder" => trans('deal::deal.placeholder.agency_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'representing' => [ "type" => 'radios', "label" => trans('deal::deal.label.representing'), "placeholder" => trans('deal::deal.placeholder.representing'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'agents_name' => [ "type" => 'text', "label" => trans('deal::deal.label.agents_name'), "placeholder" => trans('deal::deal.placeholder.agents_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'agents_contact_no' => [ "type" => 'numeric', "label" => trans('deal::deal.label.agents_contact_no'), "placeholder" => trans('deal::deal.placeholder.agents_contact_no'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'agent1' => [ "type" => 'text', "label" => trans('deal::deal.label.agent1'), "placeholder" => trans('deal::deal.placeholder.agent1'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'commission1_prs' => [ "type" => 'text', "label" => trans('deal::deal.label.commission1_prs'), "placeholder" => trans('deal::deal.placeholder.commission1_prs'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'commission1_amt' => [ "type" => 'text', "label" => trans('deal::deal.label.commission1_amt'), "placeholder" => trans('deal::deal.placeholder.commission1_amt'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'agent2' => [ "type" => 'text', "label" => trans('deal::deal.label.agent2'), "placeholder" => trans('deal::deal.placeholder.agent2'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'commission2_prs' => [ "type" => 'text', "label" => trans('deal::deal.label.commission2_prs'), "placeholder" => trans('deal::deal.placeholder.commission2_prs'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'commission2_amt' => [ "type" => 'text', "label" => trans('deal::deal.label.commission2_amt'), "placeholder" => trans('deal::deal.placeholder.commission2_amt'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'agent3' => [ "type" => 'text', "label" => trans('deal::deal.label.agent3'), "placeholder" => trans('deal::deal.placeholder.agent3'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'commission3_prs' => [ "type" => 'text', "label" => trans('deal::deal.label.commission3_prs'), "placeholder" => trans('deal::deal.placeholder.commission3_prs'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'commission3_amt' => [ "type" => 'text', "label" => trans('deal::deal.label.commission3_amt'), "placeholder" => trans('deal::deal.placeholder.commission3_amt'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'agency_commission_prs' => [ "type" => 'text', "label" => trans('deal::deal.label.agency_commission_prs'), "placeholder" => trans('deal::deal.placeholder.agency_commission_prs'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'agency_commission_amt' => [ "type" => 'text', "label" => trans('deal::deal.label.agency_commission_amt'), "placeholder" => trans('deal::deal.placeholder.agency_commission_amt'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'conveyance_fee' => [ "type" => 'decimal', "label" => trans('deal::deal.label.conveyance_fee'), "placeholder" => trans('deal::deal.placeholder.conveyance_fee'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'prev_notes' => [ "type" => 'text', "label" => trans('deal::deal.label.prev_notes'), "placeholder" => trans('deal::deal.placeholder.prev_notes'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'beds' => [ "type" => 'numeric', "label" => trans('deal::deal.label.beds'), "placeholder" => trans('deal::deal.placeholder.beds'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'atype' => [ "type" => 'text', "label" => trans('deal::deal.label.atype'), "placeholder" => trans('deal::deal.placeholder.atype'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'street' => [ "type" => 'text', "label" => trans('deal::deal.label.street'), "placeholder" => trans('deal::deal.placeholder.street'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'floor' => [ "type" => 'text', "label" => trans('deal::deal.label.floor'), "placeholder" => trans('deal::deal.placeholder.floor'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'property_usage' => [ "type" => 'radios', "label" => trans('deal::deal.label.property_usage'), "placeholder" => trans('deal::deal.placeholder.property_usage'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'tenancy' => [ "type" => 'date_picker', "label" => trans('deal::deal.label.tenancy'), "placeholder" => trans('deal::deal.placeholder.tenancy'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'notes' => [ "type" => 'text', "label" => trans('deal::deal.label.notes'), "placeholder" => trans('deal::deal.placeholder.notes'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'documents' => [ "type" => 'text', "label" => trans('deal::deal.label.documents'), "placeholder" => trans('deal::deal.placeholder.documents'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'pdf_documents' => [ "type" => 'text', "label" => trans('deal::deal.label.pdf_documents'), "placeholder" => trans('deal::deal.placeholder.pdf_documents'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'deals_area' => [ "type" => 'radios', "label" => trans('deal::deal.label.deals_area'), "placeholder" => trans('deal::deal.placeholder.deals_area'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'created_by' => [ "type" => 'numeric', "label" => trans('deal::deal.label.created_by'), "placeholder" => trans('deal::deal.placeholder.created_by'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'additional_terms' => [ "type" => 'text', "label" => trans('deal::deal.label.additional_terms'), "placeholder" => trans('deal::deal.placeholder.additional_terms'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }