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' => [ 'agent_id' => [ "type" => 'numeric', "label" => trans('listing::referral.label.agent_id'), "placeholder" => trans('listing::referral.placeholder.agent_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'referral_id' => [ "type" => 'numeric', "label" => trans('listing::referral.label.referral_id'), "placeholder" => trans('listing::referral.placeholder.referral_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'expiry_at' => [ "type" => 'date_picker', "label" => trans('listing::referral.label.expiry_at'), "placeholder" => trans('listing::referral.placeholder.expiry_at'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'agent_percentage' => [ "type" => 'numeric', "label" => trans('listing::referral.label.agent_percentage'), "placeholder" => trans('listing::referral.placeholder.agent_percentage'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'buyer_percentage' => [ "type" => 'numeric', "label" => trans('listing::referral.label.buyer_percentage'), "placeholder" => trans('listing::referral.placeholder.buyer_percentage'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'establishment_name' => [ "type" => 'text', "label" => trans('listing::referral.label.establishment_name'), "placeholder" => trans('listing::referral.placeholder.establishment_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'address1' => [ "type" => 'text', "label" => trans('listing::referral.label.address1'), "placeholder" => trans('listing::referral.placeholder.address1'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'address2' => [ "type" => 'text', "label" => trans('listing::referral.label.address2'), "placeholder" => trans('listing::referral.placeholder.address2'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'phone' => [ "type" => 'numeric', "label" => trans('listing::referral.label.phone'), "placeholder" => trans('listing::referral.placeholder.phone'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'email' => [ "type" => 'text', "label" => trans('listing::referral.label.email'), "placeholder" => trans('listing::referral.placeholder.email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'fax' => [ "type" => 'text', "label" => trans('listing::referral.label.fax'), "placeholder" => trans('listing::referral.placeholder.fax'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'orn' => [ "type" => 'text', "label" => trans('listing::referral.label.orn'), "placeholder" => trans('listing::referral.placeholder.orn'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'ded_lisc' => [ "type" => 'text', "label" => trans('listing::referral.label.ded_lisc'), "placeholder" => trans('listing::referral.placeholder.ded_lisc'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'po_box' => [ "type" => 'text', "label" => trans('listing::referral.label.po_box'), "placeholder" => trans('listing::referral.placeholder.po_box'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'buyer_agent_name' => [ "type" => 'text', "label" => trans('listing::referral.label.buyer_agent_name'), "placeholder" => trans('listing::referral.placeholder.buyer_agent_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'buyer_agent_brn' => [ "type" => 'text', "label" => trans('listing::referral.label.buyer_agent_brn'), "placeholder" => trans('listing::referral.placeholder.buyer_agent_brn'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'buyer_agent_date_issued' => [ "type" => 'date_picker', "label" => trans('listing::referral.label.buyer_agent_date_issued'), "placeholder" => trans('listing::referral.placeholder.buyer_agent_date_issued'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'buyer_agent_mobile' => [ "type" => 'numeric', "label" => trans('listing::referral.label.buyer_agent_mobile'), "placeholder" => trans('listing::referral.placeholder.buyer_agent_mobile'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'buyer_agent_email' => [ "type" => 'text', "label" => trans('listing::referral.label.buyer_agent_email'), "placeholder" => trans('listing::referral.placeholder.buyer_agent_email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'fee_payby' => [ "type" => 'text', "label" => trans('listing::referral.label.fee_payby'), "placeholder" => trans('listing::referral.placeholder.fee_payby'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'budget' => [ "type" => 'text', "label" => trans('listing::referral.label.budget'), "placeholder" => trans('listing::referral.placeholder.budget'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'documents' => [ "type" => 'text', "label" => trans('listing::referral.label.documents'), "placeholder" => trans('listing::referral.placeholder.documents'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }