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' => [ 'reporting_to' => [ "type" => 'numeric', "label" => trans('buyer::buyer.label.reporting_to'), "placeholder" => trans('buyer::buyer.placeholder.reporting_to'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'name' => [ "type" => 'text', "label" => trans('buyer::buyer.label.name'), "placeholder" => trans('buyer::buyer.placeholder.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" => [], ], ], 'password' => [ "type" => 'text', "label" => trans('buyer::buyer.label.password'), "placeholder" => trans('buyer::buyer.placeholder.password'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'company_name' => [ "type" => 'text', "label" => trans('buyer::buyer.label.company_name'), "placeholder" => trans('buyer::buyer.placeholder.company_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'abn' => [ "type" => 'text', "label" => trans('buyer::buyer.label.abn'), "placeholder" => trans('buyer::buyer.placeholder.abn'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'title' => [ "type" => 'text', "label" => trans('buyer::buyer.label.title'), "placeholder" => trans('buyer::buyer.placeholder.title'), "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" => [], ], ], 'sex' => [ "type" => 'radios', "label" => trans('buyer::buyer.label.sex'), "placeholder" => trans('buyer::buyer.placeholder.sex'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'dob' => [ "type" => 'date_picker', "label" => trans('buyer::buyer.label.dob'), "placeholder" => trans('buyer::buyer.placeholder.dob'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'designation' => [ "type" => 'text', "label" => trans('buyer::buyer.label.designation'), "placeholder" => trans('buyer::buyer.placeholder.designation'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'mobile' => [ "type" => 'text', "label" => trans('buyer::buyer.label.mobile'), "placeholder" => trans('buyer::buyer.placeholder.mobile'), "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" => [], ], ], 'address' => [ "type" => 'text', "label" => trans('buyer::buyer.label.address'), "placeholder" => trans('buyer::buyer.placeholder.address'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'financial_authorization' => [ "type" => 'numeric', "label" => trans('buyer::buyer.label.financial_authorization'), "placeholder" => trans('buyer::buyer.placeholder.financial_authorization'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'work_email' => [ "type" => 'text', "label" => trans('buyer::buyer.label.work_email'), "placeholder" => trans('buyer::buyer.placeholder.work_email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'alternative_phone' => [ "type" => 'text', "label" => trans('buyer::buyer.label.alternative_phone'), "placeholder" => trans('buyer::buyer.placeholder.alternative_phone'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'street' => [ "type" => 'text', "label" => trans('buyer::buyer.label.street'), "placeholder" => trans('buyer::buyer.placeholder.street'), "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" => [], ], ], 'district' => [ "type" => 'text', "label" => trans('buyer::buyer.label.district'), "placeholder" => trans('buyer::buyer.placeholder.district'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'state' => [ "type" => 'text', "label" => trans('buyer::buyer.label.state'), "placeholder" => trans('buyer::buyer.placeholder.state'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'country' => [ "type" => 'numeric', "label" => trans('buyer::buyer.label.country'), "placeholder" => trans('buyer::buyer.placeholder.country'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'photo' => [ "type" => 'text', "label" => trans('buyer::buyer.label.photo'), "placeholder" => trans('buyer::buyer.placeholder.photo'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'web' => [ "type" => 'text', "label" => trans('buyer::buyer.label.web'), "placeholder" => trans('buyer::buyer.placeholder.web'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'permissions' => [ "type" => 'html_editor', "label" => trans('buyer::buyer.label.permissions'), "placeholder" => trans('buyer::buyer.placeholder.permissions'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'email_verified_at' => [ "type" => 'date_time_picker', "label" => trans('buyer::buyer.label.email_verified_at'), "placeholder" => trans('buyer::buyer.placeholder.email_verified_at'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'user_mode' => [ "type" => 'radios', "label" => trans('buyer::buyer.label.user_mode'), "placeholder" => trans('buyer::buyer.placeholder.user_mode'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'team_id' => [ "type" => 'numeric', "label" => trans('buyer::buyer.label.team_id'), "placeholder" => trans('buyer::buyer.placeholder.team_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'trading_name' => [ "type" => 'text', "label" => trans('buyer::buyer.label.trading_name'), "placeholder" => trans('buyer::buyer.placeholder.trading_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'duns_number' => [ "type" => 'text', "label" => trans('buyer::buyer.label.duns_number'), "placeholder" => trans('buyer::buyer.placeholder.duns_number'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'registered_office' => [ "type" => 'text', "label" => trans('buyer::buyer.label.registered_office'), "placeholder" => trans('buyer::buyer.placeholder.registered_office'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'fb_url' => [ "type" => 'text', "label" => trans('buyer::buyer.label.fb_url'), "placeholder" => trans('buyer::buyer.placeholder.fb_url'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'linkedin_url' => [ "type" => 'text', "label" => trans('buyer::buyer.label.linkedin_url'), "placeholder" => trans('buyer::buyer.placeholder.linkedin_url'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'directors' => [ "type" => 'text', "label" => trans('buyer::buyer.label.directors'), "placeholder" => trans('buyer::buyer.placeholder.directors'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'documents' => [ "type" => 'text', "label" => trans('buyer::buyer.label.documents'), "placeholder" => trans('buyer::buyer.placeholder.documents'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'PRIMARY' => [ "type" => 'package::package.formcontrols.KEY', "label" => trans('buyer::buyer.label.PRIMARY'), "placeholder" => trans('buyer::buyer.placeholder.PRIMARY'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }