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' => [ 'json_id' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.json_id'), "placeholder" => trans('externaldatum::externaldata.placeholder.json_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'type' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.type'), "placeholder" => trans('externaldatum::externaldata.placeholder.type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'travel_type' => [ "type" => 'radios', "label" => trans('externaldatum::externaldata.label.travel_type'), "placeholder" => trans('externaldatum::externaldata.placeholder.travel_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'is_converted' => [ "type" => 'numeric', "label" => trans('externaldatum::externaldata.label.is_converted'), "placeholder" => trans('externaldatum::externaldata.placeholder.is_converted'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'title' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.title'), "placeholder" => trans('externaldatum::externaldata.placeholder.title'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'nr' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.nr'), "placeholder" => trans('externaldatum::externaldata.placeholder.nr'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'meta_source' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.meta_source'), "placeholder" => trans('externaldatum::externaldata.placeholder.meta_source'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'request_code' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.request_code'), "placeholder" => trans('externaldatum::externaldata.placeholder.request_code'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'ship_name' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.ship_name'), "placeholder" => trans('externaldatum::externaldata.placeholder.ship_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'length' => [ "type" => 'numeric', "label" => trans('externaldatum::externaldata.label.length'), "placeholder" => trans('externaldatum::externaldata.placeholder.length'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'style' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.style'), "placeholder" => trans('externaldatum::externaldata.placeholder.style'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'style_name' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.style_name'), "placeholder" => trans('externaldatum::externaldata.placeholder.style_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'start_loc' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.start_loc'), "placeholder" => trans('externaldatum::externaldata.placeholder.start_loc'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'page_url' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.page_url'), "placeholder" => trans('externaldatum::externaldata.placeholder.page_url'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'trip_kind_description' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.trip_kind_description'), "placeholder" => trans('externaldatum::externaldata.placeholder.trip_kind_description'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'trip_days' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.trip_days'), "placeholder" => trans('externaldatum::externaldata.placeholder.trip_days'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'description' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.description'), "placeholder" => trans('externaldatum::externaldata.placeholder.description'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'teaser_text' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.teaser_text'), "placeholder" => trans('externaldatum::externaldata.placeholder.teaser_text'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'average_pax' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.average_pax'), "placeholder" => trans('externaldatum::externaldata.placeholder.average_pax'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'base_price' => [ "type" => 'decimal', "label" => trans('externaldatum::externaldata.label.base_price'), "placeholder" => trans('externaldatum::externaldata.placeholder.base_price'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'baseprice_wo_flight' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.baseprice_wo_flight'), "placeholder" => trans('externaldatum::externaldata.placeholder.baseprice_wo_flight'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'extra_styles' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.extra_styles'), "placeholder" => trans('externaldatum::externaldata.placeholder.extra_styles'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'highlights' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.highlights'), "placeholder" => trans('externaldatum::externaldata.placeholder.highlights'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'countries' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.countries'), "placeholder" => trans('externaldatum::externaldata.placeholder.countries'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'meta_countries' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.meta_countries'), "placeholder" => trans('externaldatum::externaldata.placeholder.meta_countries'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'dates_title' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.dates_title'), "placeholder" => trans('externaldatum::externaldata.placeholder.dates_title'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'date_remark' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.date_remark'), "placeholder" => trans('externaldatum::externaldata.placeholder.date_remark'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'dates' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.dates'), "placeholder" => trans('externaldatum::externaldata.placeholder.dates'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'participants' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.participants'), "placeholder" => trans('externaldatum::externaldata.placeholder.participants'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'features' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.features'), "placeholder" => trans('externaldatum::externaldata.placeholder.features'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'images' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.images'), "placeholder" => trans('externaldatum::externaldata.placeholder.images'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'location_img' => [ "type" => 'text', "label" => trans('externaldatum::externaldata.label.location_img'), "placeholder" => trans('externaldatum::externaldata.placeholder.location_img'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'json' => [ "type" => 'html_editor', "label" => trans('externaldatum::externaldata.label.json'), "placeholder" => trans('externaldatum::externaldata.placeholder.json'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'flag' => [ "type" => 'radios', "label" => trans('externaldatum::externaldata.label.flag'), "placeholder" => trans('externaldatum::externaldata.placeholder.flag'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }