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' => [ 'account_id' => [ "type" => 'numeric', "label" => trans('deal::contacts.label.account_id'), "placeholder" => trans('deal::contacts.placeholder.account_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'title' => [ "type" => 'text', "label" => trans('deal::contacts.label.title'), "placeholder" => trans('deal::contacts.placeholder.title'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'name' => [ "type" => 'text', "label" => trans('deal::contacts.label.name'), "placeholder" => trans('deal::contacts.placeholder.name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'mobile' => [ "type" => 'text', "label" => trans('deal::contacts.label.mobile'), "placeholder" => trans('deal::contacts.placeholder.mobile'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'phone' => [ "type" => 'text', "label" => trans('deal::contacts.label.phone'), "placeholder" => trans('deal::contacts.placeholder.phone'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'email' => [ "type" => 'text', "label" => trans('deal::contacts.label.email'), "placeholder" => trans('deal::contacts.placeholder.email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'secondary_email' => [ "type" => 'text', "label" => trans('deal::contacts.label.secondary_email'), "placeholder" => trans('deal::contacts.placeholder.secondary_email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact_type' => [ "type" => 'text', "label" => trans('deal::contacts.label.contact_type'), "placeholder" => trans('deal::contacts.placeholder.contact_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'nationality' => [ "type" => 'numeric', "label" => trans('deal::contacts.label.nationality'), "placeholder" => trans('deal::contacts.placeholder.nationality'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'dob' => [ "type" => 'date_picker', "label" => trans('deal::contacts.label.dob'), "placeholder" => trans('deal::contacts.placeholder.dob'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'is_resident' => [ "type" => 'numeric', "label" => trans('deal::contacts.label.is_resident'), "placeholder" => trans('deal::contacts.placeholder.is_resident'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'emirates_id' => [ "type" => 'text', "label" => trans('deal::contacts.label.emirates_id'), "placeholder" => trans('deal::contacts.placeholder.emirates_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'passport' => [ "type" => 'text', "label" => trans('deal::contacts.label.passport'), "placeholder" => trans('deal::contacts.placeholder.passport'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'language' => [ "type" => 'text', "label" => trans('deal::contacts.label.language'), "placeholder" => trans('deal::contacts.placeholder.language'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'poa_name' => [ "type" => 'text', "label" => trans('deal::contacts.label.poa_name'), "placeholder" => trans('deal::contacts.placeholder.poa_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'poa_nationality' => [ "type" => 'numeric', "label" => trans('deal::contacts.label.poa_nationality'), "placeholder" => trans('deal::contacts.placeholder.poa_nationality'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'trade_license' => [ "type" => 'text', "label" => trans('deal::contacts.label.trade_license'), "placeholder" => trans('deal::contacts.placeholder.trade_license'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'manager_name' => [ "type" => 'text', "label" => trans('deal::contacts.label.manager_name'), "placeholder" => trans('deal::contacts.placeholder.manager_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'manager_nationality' => [ "type" => 'numeric', "label" => trans('deal::contacts.label.manager_nationality'), "placeholder" => trans('deal::contacts.placeholder.manager_nationality'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'owners' => [ "type" => 'text', "label" => trans('deal::contacts.label.owners'), "placeholder" => trans('deal::contacts.placeholder.owners'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'documents' => [ "type" => 'text', "label" => trans('deal::contacts.label.documents'), "placeholder" => trans('deal::contacts.placeholder.documents'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }