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' => [ 'media_id' => [ "type" => 'numeric', "label" => trans('medium::variant.label.media_id'), "placeholder" => trans('medium::variant.placeholder.media_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'type' => [ "type" => 'numeric', "label" => trans('medium::variant.label.type'), "placeholder" => trans('medium::variant.placeholder.type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'title' => [ "type" => 'text', "label" => trans('medium::variant.label.title'), "placeholder" => trans('medium::variant.placeholder.title'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'variant_status' => [ "type" => 'select', "label" => trans('medium::variant.label.variant_status'), "placeholder" => trans('medium::variant.placeholder.variant_status'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'period_id' => [ "type" => 'numeric', "label" => trans('medium::variant.label.period_id'), "placeholder" => trans('medium::variant.placeholder.period_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'category_id' => [ "type" => 'numeric', "label" => trans('medium::variant.label.category_id'), "placeholder" => trans('medium::variant.placeholder.category_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'media_type_id' => [ "type" => 'numeric', "label" => trans('medium::variant.label.media_type_id'), "placeholder" => trans('medium::variant.placeholder.media_type_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'evaluation' => [ "type" => 'text', "label" => trans('medium::variant.label.evaluation'), "placeholder" => trans('medium::variant.placeholder.evaluation'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'embedded_social' => [ "type" => 'text', "label" => trans('medium::variant.label.embedded_social'), "placeholder" => trans('medium::variant.placeholder.embedded_social'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'note' => [ "type" => 'text', "label" => trans('medium::variant.label.note'), "placeholder" => trans('medium::variant.placeholder.note'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'runtime_type' => [ "type" => 'select', "label" => trans('medium::variant.label.runtime_type'), "placeholder" => trans('medium::variant.placeholder.runtime_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'running_time' => [ "type" => 'text', "label" => trans('medium::variant.label.running_time'), "placeholder" => trans('medium::variant.placeholder.running_time'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'starting_date' => [ "type" => 'date_picker', "label" => trans('medium::variant.label.starting_date'), "placeholder" => trans('medium::variant.placeholder.starting_date'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'end_date' => [ "type" => 'date_picker', "label" => trans('medium::variant.label.end_date'), "placeholder" => trans('medium::variant.placeholder.end_date'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'deadline_booking' => [ "type" => 'date_time_picker', "label" => trans('medium::variant.label.deadline_booking'), "placeholder" => trans('medium::variant.placeholder.deadline_booking'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'deadline_artwork' => [ "type" => 'date_time_picker', "label" => trans('medium::variant.label.deadline_artwork'), "placeholder" => trans('medium::variant.placeholder.deadline_artwork'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'components' => [ "type" => 'text', "label" => trans('medium::variant.label.components'), "placeholder" => trans('medium::variant.placeholder.components'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'cost' => [ "type" => 'numeric', "label" => trans('medium::variant.label.cost'), "placeholder" => trans('medium::variant.placeholder.cost'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'discount' => [ "type" => 'text', "label" => trans('medium::variant.label.discount'), "placeholder" => trans('medium::variant.placeholder.discount'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'price' => [ "type" => 'numeric', "label" => trans('medium::variant.label.price'), "placeholder" => trans('medium::variant.placeholder.price'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'vat' => [ "type" => 'numeric', "label" => trans('medium::variant.label.vat'), "placeholder" => trans('medium::variant.placeholder.vat'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'price_inkl_vat' => [ "type" => 'numeric', "label" => trans('medium::variant.label.price_inkl_vat'), "placeholder" => trans('medium::variant.placeholder.price_inkl_vat'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'raffle' => [ "type" => 'text', "label" => trans('medium::variant.label.raffle'), "placeholder" => trans('medium::variant.placeholder.raffle'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'begin' => [ "type" => 'date_time_picker', "label" => trans('medium::variant.label.begin'), "placeholder" => trans('medium::variant.placeholder.begin'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'stop' => [ "type" => 'date_time_picker', "label" => trans('medium::variant.label.stop'), "placeholder" => trans('medium::variant.placeholder.stop'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }