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' => [ 'co_buyer_id' => [ "type" => 'numeric', "label" => trans('buyer::buyer.label.co_buyer_id'), "placeholder" => trans('buyer::buyer.placeholder.co_buyer_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'first_name' => [ "type" => 'text', "label" => trans('buyer::buyer.label.first_name'), "placeholder" => trans('buyer::buyer.placeholder.first_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'last_name' => [ "type" => 'text', "label" => trans('buyer::buyer.label.last_name'), "placeholder" => trans('buyer::buyer.placeholder.last_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'email' => [ "type" => 'text', "label" => trans('buyer::buyer.label.email'), "placeholder" => trans('buyer::buyer.placeholder.email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'phone' => [ "type" => 'text', "label" => trans('buyer::buyer.label.phone'), "placeholder" => trans('buyer::buyer.placeholder.phone'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'password' => [ "type" => 'text', "label" => trans('buyer::buyer.label.password'), "placeholder" => trans('buyer::buyer.placeholder.password'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'api_token' => [ "type" => 'text', "label" => trans('buyer::buyer.label.api_token'), "placeholder" => trans('buyer::buyer.placeholder.api_token'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'remember_token' => [ "type" => 'text', "label" => trans('buyer::buyer.label.remember_token'), "placeholder" => trans('buyer::buyer.placeholder.remember_token'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'gender' => [ "type" => 'text', "label" => trans('buyer::buyer.label.gender'), "placeholder" => trans('buyer::buyer.placeholder.gender'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'lead_type' => [ "type" => 'text', "label" => trans('buyer::buyer.label.lead_type'), "placeholder" => trans('buyer::buyer.placeholder.lead_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'city' => [ "type" => 'text', "label" => trans('buyer::buyer.label.city'), "placeholder" => trans('buyer::buyer.placeholder.city'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'latitude' => [ "type" => 'text', "label" => trans('buyer::buyer.label.latitude'), "placeholder" => trans('buyer::buyer.placeholder.latitude'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'longitude' => [ "type" => 'text', "label" => trans('buyer::buyer.label.longitude'), "placeholder" => trans('buyer::buyer.placeholder.longitude'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'gross_income' => [ "type" => 'decimal', "label" => trans('buyer::buyer.label.gross_income'), "placeholder" => trans('buyer::buyer.placeholder.gross_income'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'gross_income_type' => [ "type" => 'text', "label" => trans('buyer::buyer.label.gross_income_type'), "placeholder" => trans('buyer::buyer.placeholder.gross_income_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'debt_amount' => [ "type" => 'decimal', "label" => trans('buyer::buyer.label.debt_amount'), "placeholder" => trans('buyer::buyer.placeholder.debt_amount'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'monthly_pay_amount' => [ "type" => 'decimal', "label" => trans('buyer::buyer.label.monthly_pay_amount'), "placeholder" => trans('buyer::buyer.placeholder.monthly_pay_amount'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'downpayment_range' => [ "type" => 'text', "label" => trans('buyer::buyer.label.downpayment_range'), "placeholder" => trans('buyer::buyer.placeholder.downpayment_range'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'income_source' => [ "type" => 'text', "label" => trans('buyer::buyer.label.income_source'), "placeholder" => trans('buyer::buyer.placeholder.income_source'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'credit_score' => [ "type" => 'numeric', "label" => trans('buyer::buyer.label.credit_score'), "placeholder" => trans('buyer::buyer.placeholder.credit_score'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'monthly_rent' => [ "type" => 'decimal', "label" => trans('buyer::buyer.label.monthly_rent'), "placeholder" => trans('buyer::buyer.placeholder.monthly_rent'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'rent_own_monthly_payment' => [ "type" => 'decimal', "label" => trans('buyer::buyer.label.rent_own_monthly_payment'), "placeholder" => trans('buyer::buyer.placeholder.rent_own_monthly_payment'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'bank_id' => [ "type" => 'numeric', "label" => trans('buyer::buyer.label.bank_id'), "placeholder" => trans('buyer::buyer.placeholder.bank_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'property_type' => [ "type" => 'text', "label" => trans('buyer::buyer.label.property_type'), "placeholder" => trans('buyer::buyer.placeholder.property_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'price_range_min' => [ "type" => 'text', "label" => trans('buyer::buyer.label.price_range_min'), "placeholder" => trans('buyer::buyer.placeholder.price_range_min'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'price_range_max' => [ "type" => 'text', "label" => trans('buyer::buyer.label.price_range_max'), "placeholder" => trans('buyer::buyer.placeholder.price_range_max'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'bedroom_min' => [ "type" => 'text', "label" => trans('buyer::buyer.label.bedroom_min'), "placeholder" => trans('buyer::buyer.placeholder.bedroom_min'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'bedroom_max' => [ "type" => 'text', "label" => trans('buyer::buyer.label.bedroom_max'), "placeholder" => trans('buyer::buyer.placeholder.bedroom_max'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'bathroom_min' => [ "type" => 'text', "label" => trans('buyer::buyer.label.bathroom_min'), "placeholder" => trans('buyer::buyer.placeholder.bathroom_min'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'bathroom_max' => [ "type" => 'text', "label" => trans('buyer::buyer.label.bathroom_max'), "placeholder" => trans('buyer::buyer.placeholder.bathroom_max'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'priority' => [ "type" => 'text', "label" => trans('buyer::buyer.label.priority'), "placeholder" => trans('buyer::buyer.placeholder.priority'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'pre_approved' => [ "type" => 'text', "label" => trans('buyer::buyer.label.pre_approved'), "placeholder" => trans('buyer::buyer.placeholder.pre_approved'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'timeline' => [ "type" => 'text', "label" => trans('buyer::buyer.label.timeline'), "placeholder" => trans('buyer::buyer.placeholder.timeline'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'specialties' => [ "type" => 'text', "label" => trans('buyer::buyer.label.specialties'), "placeholder" => trans('buyer::buyer.placeholder.specialties'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'parking' => [ "type" => 'text', "label" => trans('buyer::buyer.label.parking'), "placeholder" => trans('buyer::buyer.placeholder.parking'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'garages' => [ "type" => 'text', "label" => trans('buyer::buyer.label.garages'), "placeholder" => trans('buyer::buyer.placeholder.garages'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'plex' => [ "type" => 'text', "label" => trans('buyer::buyer.label.plex'), "placeholder" => trans('buyer::buyer.placeholder.plex'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'duration' => [ "type" => 'text', "label" => trans('buyer::buyer.label.duration'), "placeholder" => trans('buyer::buyer.placeholder.duration'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'reason' => [ "type" => 'text', "label" => trans('buyer::buyer.label.reason'), "placeholder" => trans('buyer::buyer.placeholder.reason'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact_status' => [ "type" => 'text', "label" => trans('buyer::buyer.label.contact_status'), "placeholder" => trans('buyer::buyer.placeholder.contact_status'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'address' => [ "type" => 'text', "label" => trans('buyer::buyer.label.address'), "placeholder" => trans('buyer::buyer.placeholder.address'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'agree_promo_email' => [ "type" => 'text', "label" => trans('buyer::buyer.label.agree_promo_email'), "placeholder" => trans('buyer::buyer.placeholder.agree_promo_email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }