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' => [ 'address_id' => [ "type" => 'numeric', "label" => trans('order::order.label.address_id'), "placeholder" => trans('order::order.placeholder.address_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'payment_address' => [ "type" => 'text', "label" => trans('order::order.label.payment_address'), "placeholder" => trans('order::order.placeholder.payment_address'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'shipping_address' => [ "type" => 'text', "label" => trans('order::order.label.shipping_address'), "placeholder" => trans('order::order.placeholder.shipping_address'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'shipping_method' => [ "type" => 'text', "label" => trans('order::order.label.shipping_method'), "placeholder" => trans('order::order.placeholder.shipping_method'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'shipping_method_description' => [ "type" => 'text', "label" => trans('order::order.label.shipping_method_description'), "placeholder" => trans('order::order.placeholder.shipping_method_description'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'payment_method' => [ "type" => 'text', "label" => trans('order::order.label.payment_method'), "placeholder" => trans('order::order.placeholder.payment_method'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'payment_status' => [ "type" => 'text', "label" => trans('order::order.label.payment_status'), "placeholder" => trans('order::order.placeholder.payment_status'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'payment_method_description' => [ "type" => 'text', "label" => trans('order::order.label.payment_method_description'), "placeholder" => trans('order::order.placeholder.payment_method_description'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'payment_tracking_id' => [ "type" => 'text', "label" => trans('order::order.label.payment_tracking_id'), "placeholder" => trans('order::order.placeholder.payment_tracking_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'trans_date' => [ "type" => 'date_picker', "label" => trans('order::order.label.trans_date'), "placeholder" => trans('order::order.placeholder.trans_date'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'bank_ref_no' => [ "type" => 'text', "label" => trans('order::order.label.bank_ref_no'), "placeholder" => trans('order::order.placeholder.bank_ref_no'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'card_name' => [ "type" => 'text', "label" => trans('order::order.label.card_name'), "placeholder" => trans('order::order.placeholder.card_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'currency' => [ "type" => 'text', "label" => trans('order::order.label.currency'), "placeholder" => trans('order::order.placeholder.currency'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'payment_amount' => [ "type" => 'text', "label" => trans('order::order.label.payment_amount'), "placeholder" => trans('order::order.placeholder.payment_amount'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'total' => [ "type" => 'text', "label" => trans('order::order.label.total'), "placeholder" => trans('order::order.placeholder.total'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'subtotal' => [ "type" => 'text', "label" => trans('order::order.label.subtotal'), "placeholder" => trans('order::order.placeholder.subtotal'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'tax' => [ "type" => 'text', "label" => trans('order::order.label.tax'), "placeholder" => trans('order::order.placeholder.tax'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'coupon_id' => [ "type" => 'numeric', "label" => trans('order::order.label.coupon_id'), "placeholder" => trans('order::order.placeholder.coupon_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'invoice_no' => [ "type" => 'numeric', "label" => trans('order::order.label.invoice_no'), "placeholder" => trans('order::order.placeholder.invoice_no'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'invoice_prefix' => [ "type" => 'text', "label" => trans('order::order.label.invoice_prefix'), "placeholder" => trans('order::order.placeholder.invoice_prefix'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'firstname' => [ "type" => 'text', "label" => trans('order::order.label.firstname'), "placeholder" => trans('order::order.placeholder.firstname'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'lastname' => [ "type" => 'text', "label" => trans('order::order.label.lastname'), "placeholder" => trans('order::order.placeholder.lastname'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'email' => [ "type" => 'text', "label" => trans('order::order.label.email'), "placeholder" => trans('order::order.placeholder.email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'telephone' => [ "type" => 'text', "label" => trans('order::order.label.telephone'), "placeholder" => trans('order::order.placeholder.telephone'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'fax' => [ "type" => 'text', "label" => trans('order::order.label.fax'), "placeholder" => trans('order::order.placeholder.fax'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'payment_custom_field' => [ "type" => 'text', "label" => trans('order::order.label.payment_custom_field'), "placeholder" => trans('order::order.placeholder.payment_custom_field'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'payment_code' => [ "type" => 'text', "label" => trans('order::order.label.payment_code'), "placeholder" => trans('order::order.placeholder.payment_code'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'shipping_custom_field' => [ "type" => 'text', "label" => trans('order::order.label.shipping_custom_field'), "placeholder" => trans('order::order.placeholder.shipping_custom_field'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'shipping_code' => [ "type" => 'text', "label" => trans('order::order.label.shipping_code'), "placeholder" => trans('order::order.placeholder.shipping_code'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'comment' => [ "type" => 'text', "label" => trans('order::order.label.comment'), "placeholder" => trans('order::order.placeholder.comment'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'order_status_id' => [ "type" => 'numeric', "label" => trans('order::order.label.order_status_id'), "placeholder" => trans('order::order.placeholder.order_status_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'tracking' => [ "type" => 'text', "label" => trans('order::order.label.tracking'), "placeholder" => trans('order::order.placeholder.tracking'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'ip' => [ "type" => 'text', "label" => trans('order::order.label.ip'), "placeholder" => trans('order::order.placeholder.ip'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'gst_type' => [ "type" => 'text', "label" => trans('order::order.label.gst_type'), "placeholder" => trans('order::order.placeholder.gst_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }