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