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' => [ 'payment_term_id' => [ "type" => 'numeric', "label" => trans('customer::customer.label.payment_term_id'), "placeholder" => trans('customer::customer.placeholder.payment_term_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'currency_id' => [ "type" => 'numeric', "label" => trans('customer::customer.label.currency_id'), "placeholder" => trans('customer::customer.placeholder.currency_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'pricelist_id' => [ "type" => 'numeric', "label" => trans('customer::customer.label.pricelist_id'), "placeholder" => trans('customer::customer.placeholder.pricelist_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'tax_id' => [ "type" => 'numeric', "label" => trans('customer::customer.label.tax_id'), "placeholder" => trans('customer::customer.placeholder.tax_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'gst_scheme_id' => [ "type" => 'numeric', "label" => trans('customer::customer.label.gst_scheme_id'), "placeholder" => trans('customer::customer.placeholder.gst_scheme_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'payment_method_id' => [ "type" => 'numeric', "label" => trans('customer::customer.label.payment_method_id'), "placeholder" => trans('customer::customer.placeholder.payment_method_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'salution' => [ "type" => 'text', "label" => trans('customer::customer.label.salution'), "placeholder" => trans('customer::customer.placeholder.salution'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'first_name' => [ "type" => 'text', "label" => trans('customer::customer.label.first_name'), "placeholder" => trans('customer::customer.placeholder.first_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'last_name' => [ "type" => 'text', "label" => trans('customer::customer.label.last_name'), "placeholder" => trans('customer::customer.placeholder.last_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'name' => [ "type" => 'text', "label" => trans('customer::customer.label.name'), "placeholder" => trans('customer::customer.placeholder.name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'display_name' => [ "type" => 'text', "label" => trans('customer::customer.label.display_name'), "placeholder" => trans('customer::customer.placeholder.display_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'email' => [ "type" => 'text', "label" => trans('customer::customer.label.email'), "placeholder" => trans('customer::customer.placeholder.email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'phone' => [ "type" => 'text', "label" => trans('customer::customer.label.phone'), "placeholder" => trans('customer::customer.placeholder.phone'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'mobile' => [ "type" => 'text', "label" => trans('customer::customer.label.mobile'), "placeholder" => trans('customer::customer.placeholder.mobile'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'website' => [ "type" => 'text', "label" => trans('customer::customer.label.website'), "placeholder" => trans('customer::customer.placeholder.website'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'password' => [ "type" => 'text', "label" => trans('customer::customer.label.password'), "placeholder" => trans('customer::customer.placeholder.password'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'api_token' => [ "type" => 'text', "label" => trans('customer::customer.label.api_token'), "placeholder" => trans('customer::customer.placeholder.api_token'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'remember_token' => [ "type" => 'text', "label" => trans('customer::customer.label.remember_token'), "placeholder" => trans('customer::customer.placeholder.remember_token'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'photo' => [ "type" => 'text', "label" => trans('customer::customer.label.photo'), "placeholder" => trans('customer::customer.placeholder.photo'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'fax' => [ "type" => 'text', "label" => trans('customer::customer.label.fax'), "placeholder" => trans('customer::customer.placeholder.fax'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'discount' => [ "type" => 'decimal', "label" => trans('customer::customer.label.discount'), "placeholder" => trans('customer::customer.placeholder.discount'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'price_include_tax' => [ "type" => 'numeric', "label" => trans('customer::customer.label.price_include_tax'), "placeholder" => trans('customer::customer.placeholder.price_include_tax'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'carrier' => [ "type" => 'text', "label" => trans('customer::customer.label.carrier'), "placeholder" => trans('customer::customer.placeholder.carrier'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'days' => [ "type" => 'numeric', "label" => trans('customer::customer.label.days'), "placeholder" => trans('customer::customer.placeholder.days'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'remarks' => [ "type" => 'html_editor', "label" => trans('customer::customer.label.remarks'), "placeholder" => trans('customer::customer.placeholder.remarks'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'facebook' => [ "type" => 'text', "label" => trans('customer::customer.label.facebook'), "placeholder" => trans('customer::customer.placeholder.facebook'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'twitter' => [ "type" => 'text', "label" => trans('customer::customer.label.twitter'), "placeholder" => trans('customer::customer.placeholder.twitter'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contacts' => [ "type" => 'html_editor', "label" => trans('customer::customer.label.contacts'), "placeholder" => trans('customer::customer.placeholder.contacts'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'billing_address' => [ "type" => 'text', "label" => trans('customer::customer.label.billing_address'), "placeholder" => trans('customer::customer.placeholder.billing_address'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'shipping_address' => [ "type" => 'text', "label" => trans('customer::customer.label.shipping_address'), "placeholder" => trans('customer::customer.placeholder.shipping_address'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }