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' => [ 'brand_id' => [ "type" => 'numeric', "label" => trans('object::bt_object.label.brand_id'), "placeholder" => trans('object::bt_object.placeholder.brand_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'location_id' => [ "type" => 'numeric', "label" => trans('object::bt_object.label.location_id'), "placeholder" => trans('object::bt_object.placeholder.location_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'attribute_id' => [ "type" => 'numeric', "label" => trans('object::bt_object.label.attribute_id'), "placeholder" => trans('object::bt_object.placeholder.attribute_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'flights_id' => [ "type" => 'numeric', "label" => trans('object::bt_object.label.flights_id'), "placeholder" => trans('object::bt_object.placeholder.flights_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'title' => [ "type" => 'text', "label" => trans('object::bt_object.label.title'), "placeholder" => trans('object::bt_object.placeholder.title'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'stars' => [ "type" => 'numeric', "label" => trans('object::bt_object.label.stars'), "placeholder" => trans('object::bt_object.placeholder.stars'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'booking_link' => [ "type" => 'text', "label" => trans('object::bt_object.label.booking_link'), "placeholder" => trans('object::bt_object.placeholder.booking_link'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'duration' => [ "type" => 'numeric', "label" => trans('object::bt_object.label.duration'), "placeholder" => trans('object::bt_object.placeholder.duration'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'price' => [ "type" => 'decimal', "label" => trans('object::bt_object.label.price'), "placeholder" => trans('object::bt_object.placeholder.price'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'latitude' => [ "type" => 'decimal', "label" => trans('object::bt_object.label.latitude'), "placeholder" => trans('object::bt_object.placeholder.latitude'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'longitude' => [ "type" => 'decimal', "label" => trans('object::bt_object.label.longitude'), "placeholder" => trans('object::bt_object.placeholder.longitude'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'details' => [ "type" => 'text', "label" => trans('object::bt_object.label.details'), "placeholder" => trans('object::bt_object.placeholder.details'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'leisure_offers' => [ "type" => 'text', "label" => trans('object::bt_object.label.leisure_offers'), "placeholder" => trans('object::bt_object.placeholder.leisure_offers'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'our_privileges' => [ "type" => 'text', "label" => trans('object::bt_object.label.our_privileges'), "placeholder" => trans('object::bt_object.placeholder.our_privileges'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'images' => [ "type" => 'images', "label" => trans('object::bt_object.label.images'), "placeholder" => trans('object::bt_object.placeholder.images'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'videos' => [ "type" => 'text', "label" => trans('object::bt_object.label.videos'), "placeholder" => trans('object::bt_object.placeholder.videos'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'meta_title' => [ "type" => 'text', "label" => trans('object::bt_object.label.meta_title'), "placeholder" => trans('object::bt_object.placeholder.meta_title'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'meta_description' => [ "type" => 'text', "label" => trans('object::bt_object.label.meta_description'), "placeholder" => trans('object::bt_object.placeholder.meta_description'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'meta_keywords' => [ "type" => 'text', "label" => trans('object::bt_object.label.meta_keywords'), "placeholder" => trans('object::bt_object.placeholder.meta_keywords'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }