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' => [ 'PersonID' => [ "type" => 'numeric', "label" => trans('ebuy::person.label.PersonID'), "placeholder" => trans('ebuy::person.placeholder.PersonID'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ',' => [ "type" => 'package::package.formcontrols.LastName', "label" => trans('ebuy::person.label.,'), "placeholder" => trans('ebuy::person.placeholder.,'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], '255),' => [ "type" => 'package::package.formcontrols.FirstName', "label" => trans('ebuy::person.label.255),'), "placeholder" => trans('ebuy::person.placeholder.255),'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], '255),' => [ "type" => 'package::package.formcontrols.Address', "label" => trans('ebuy::person.label.255),'), "placeholder" => trans('ebuy::person.placeholder.255),'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], '255),' => [ "type" => 'package::package.formcontrols.City', "label" => trans('ebuy::person.label.255),'), "placeholder" => trans('ebuy::person.placeholder.255),'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }