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' => [ 'company_id' => [ "type" => 'numeric', "label" => trans('scheduler::scheduler.label.company_id'), "placeholder" => trans('scheduler::scheduler.placeholder.company_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'seller_company_id' => [ "type" => 'numeric', "label" => trans('scheduler::scheduler.label.seller_company_id'), "placeholder" => trans('scheduler::scheduler.placeholder.seller_company_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'order_id' => [ "type" => 'numeric', "label" => trans('scheduler::scheduler.label.order_id'), "placeholder" => trans('scheduler::scheduler.placeholder.order_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'custom_margin_id' => [ "type" => 'numeric', "label" => trans('scheduler::scheduler.label.custom_margin_id'), "placeholder" => trans('scheduler::scheduler.placeholder.custom_margin_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'type' => [ "type" => 'text', "label" => trans('scheduler::scheduler.label.type'), "placeholder" => trans('scheduler::scheduler.placeholder.type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'is_checked' => [ "type" => 'numeric', "label" => trans('scheduler::scheduler.label.is_checked'), "placeholder" => trans('scheduler::scheduler.placeholder.is_checked'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'actual_file_name' => [ "type" => 'text', "label" => trans('scheduler::scheduler.label.actual_file_name'), "placeholder" => trans('scheduler::scheduler.placeholder.actual_file_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'json_file' => [ "type" => 'text', "label" => trans('scheduler::scheduler.label.json_file'), "placeholder" => trans('scheduler::scheduler.placeholder.json_file'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'total_records' => [ "type" => 'numeric', "label" => trans('scheduler::scheduler.label.total_records'), "placeholder" => trans('scheduler::scheduler.placeholder.total_records'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'processed' => [ "type" => 'numeric', "label" => trans('scheduler::scheduler.label.processed'), "placeholder" => trans('scheduler::scheduler.placeholder.processed'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'pagenumber' => [ "type" => 'numeric', "label" => trans('scheduler::scheduler.label.pagenumber'), "placeholder" => trans('scheduler::scheduler.placeholder.pagenumber'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'scheduled_on' => [ "type" => 'date_time_picker', "label" => trans('scheduler::scheduler.label.scheduled_on'), "placeholder" => trans('scheduler::scheduler.placeholder.scheduled_on'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'prepend_image_url' => [ "type" => 'text', "label" => trans('scheduler::scheduler.label.prepend_image_url'), "placeholder" => trans('scheduler::scheduler.placeholder.prepend_image_url'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'zip_file' => [ "type" => 'text', "label" => trans('scheduler::scheduler.label.zip_file'), "placeholder" => trans('scheduler::scheduler.placeholder.zip_file'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'exported_file' => [ "type" => 'text', "label" => trans('scheduler::scheduler.label.exported_file'), "placeholder" => trans('scheduler::scheduler.placeholder.exported_file'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'imported_file' => [ "type" => 'text', "label" => trans('scheduler::scheduler.label.imported_file'), "placeholder" => trans('scheduler::scheduler.placeholder.imported_file'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'subscription_id' => [ "type" => 'numeric', "label" => trans('scheduler::scheduler.label.subscription_id'), "placeholder" => trans('scheduler::scheduler.placeholder.subscription_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }