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