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' => [ 'property_address' => [ "type" => 'text', "label" => trans('transactions::past_transaction.label.property_address'), "placeholder" => trans('transactions::past_transaction.placeholder.property_address'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'city' => [ "type" => 'text', "label" => trans('transactions::past_transaction.label.city'), "placeholder" => trans('transactions::past_transaction.placeholder.city'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'zipcode' => [ "type" => 'text', "label" => trans('transactions::past_transaction.label.zipcode'), "placeholder" => trans('transactions::past_transaction.placeholder.zipcode'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'state' => [ "type" => 'text', "label" => trans('transactions::past_transaction.label.state'), "placeholder" => trans('transactions::past_transaction.placeholder.state'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'property_typ' => [ "type" => 'text', "label" => trans('transactions::past_transaction.label.property_typ'), "placeholder" => trans('transactions::past_transaction.placeholder.property_typ'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'unit' => [ "type" => 'text', "label" => trans('transactions::past_transaction.label.unit'), "placeholder" => trans('transactions::past_transaction.placeholder.unit'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'representing' => [ "type" => 'text', "label" => trans('transactions::past_transaction.label.representing'), "placeholder" => trans('transactions::past_transaction.placeholder.representing'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'listing_date' => [ "type" => 'text', "label" => trans('transactions::past_transaction.label.listing_date'), "placeholder" => trans('transactions::past_transaction.placeholder.listing_date'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'selling_date' => [ "type" => 'text', "label" => trans('transactions::past_transaction.label.selling_date'), "placeholder" => trans('transactions::past_transaction.placeholder.selling_date'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'listing_price' => [ "type" => 'text', "label" => trans('transactions::past_transaction.label.listing_price'), "placeholder" => trans('transactions::past_transaction.placeholder.listing_price'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'selling_price' => [ "type" => 'text', "label" => trans('transactions::past_transaction.label.selling_price'), "placeholder" => trans('transactions::past_transaction.placeholder.selling_price'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'bedrooms' => [ "type" => 'text', "label" => trans('transactions::past_transaction.label.bedrooms'), "placeholder" => trans('transactions::past_transaction.placeholder.bedrooms'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'bathrooms' => [ "type" => 'text', "label" => trans('transactions::past_transaction.label.bathrooms'), "placeholder" => trans('transactions::past_transaction.placeholder.bathrooms'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'mls_name' => [ "type" => 'text', "label" => trans('transactions::past_transaction.label.mls_name'), "placeholder" => trans('transactions::past_transaction.placeholder.mls_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'square_feet' => [ "type" => 'text', "label" => trans('transactions::past_transaction.label.square_feet'), "placeholder" => trans('transactions::past_transaction.placeholder.square_feet'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'mls_number' => [ "type" => 'text', "label" => trans('transactions::past_transaction.label.mls_number'), "placeholder" => trans('transactions::past_transaction.placeholder.mls_number'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'transaction_details' => [ "type" => 'text', "label" => trans('transactions::past_transaction.label.transaction_details'), "placeholder" => trans('transactions::past_transaction.placeholder.transaction_details'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'other_agent_name' => [ "type" => 'text', "label" => trans('transactions::past_transaction.label.other_agent_name'), "placeholder" => trans('transactions::past_transaction.placeholder.other_agent_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'other_agent_office' => [ "type" => 'text', "label" => trans('transactions::past_transaction.label.other_agent_office'), "placeholder" => trans('transactions::past_transaction.placeholder.other_agent_office'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'other_agent_license' => [ "type" => 'text', "label" => trans('transactions::past_transaction.label.other_agent_license'), "placeholder" => trans('transactions::past_transaction.placeholder.other_agent_license'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'broker_listing_page' => [ "type" => 'text', "label" => trans('transactions::past_transaction.label.broker_listing_page'), "placeholder" => trans('transactions::past_transaction.placeholder.broker_listing_page'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }