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