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' => [ 'title' => [ "type" => 'text', "label" => trans('product::product.label.title'), "placeholder" => trans('product::product.placeholder.title'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'tagline' => [ "type" => 'text', "label" => trans('product::product.label.tagline'), "placeholder" => trans('product::product.placeholder.tagline'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'parentcategory_id' => [ "type" => 'numeric', "label" => trans('product::product.label.parentcategory_id'), "placeholder" => trans('product::product.placeholder.parentcategory_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'category_id' => [ "type" => 'numeric', "label" => trans('product::product.label.category_id'), "placeholder" => trans('product::product.placeholder.category_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'brand_id' => [ "type" => 'numeric', "label" => trans('product::product.label.brand_id'), "placeholder" => trans('product::product.placeholder.brand_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'model_id' => [ "type" => 'numeric', "label" => trans('product::product.label.model_id'), "placeholder" => trans('product::product.placeholder.model_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'available_status' => [ "type" => 'radios', "label" => trans('product::product.label.available_status'), "placeholder" => trans('product::product.placeholder.available_status'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'description' => [ "type" => 'text', "label" => trans('product::product.label.description'), "placeholder" => trans('product::product.placeholder.description'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'features' => [ "type" => 'text', "label" => trans('product::product.label.features'), "placeholder" => trans('product::product.placeholder.features'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'price' => [ "type" => 'numeric', "label" => trans('product::product.label.price'), "placeholder" => trans('product::product.placeholder.price'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'discount' => [ "type" => 'numeric', "label" => trans('product::product.label.discount'), "placeholder" => trans('product::product.placeholder.discount'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'topic_subject' => [ "type" => 'text', "label" => trans('product::product.label.topic_subject'), "placeholder" => trans('product::product.placeholder.topic_subject'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'topic_style' => [ "type" => 'text', "label" => trans('product::product.label.topic_style'), "placeholder" => trans('product::product.placeholder.topic_style'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'gendergroup' => [ "type" => 'text', "label" => trans('product::product.label.gendergroup'), "placeholder" => trans('product::product.placeholder.gendergroup'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'agegroup' => [ "type" => 'text', "label" => trans('product::product.label.agegroup'), "placeholder" => trans('product::product.placeholder.agegroup'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'targetgroup' => [ "type" => 'text', "label" => trans('product::product.label.targetgroup'), "placeholder" => trans('product::product.placeholder.targetgroup'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'special_targetgroup' => [ "type" => 'text', "label" => trans('product::product.label.special_targetgroup'), "placeholder" => trans('product::product.placeholder.special_targetgroup'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'budget' => [ "type" => 'text', "label" => trans('product::product.label.budget'), "placeholder" => trans('product::product.placeholder.budget'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'time' => [ "type" => 'text', "label" => trans('product::product.label.time'), "placeholder" => trans('product::product.placeholder.time'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'location' => [ "type" => 'text', "label" => trans('product::product.label.location'), "placeholder" => trans('product::product.placeholder.location'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'delivery' => [ "type" => 'text', "label" => trans('product::product.label.delivery'), "placeholder" => trans('product::product.placeholder.delivery'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'email' => [ "type" => 'text', "label" => trans('product::product.label.email'), "placeholder" => trans('product::product.placeholder.email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'phone' => [ "type" => 'text', "label" => trans('product::product.label.phone'), "placeholder" => trans('product::product.placeholder.phone'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'website' => [ "type" => 'text', "label" => trans('product::product.label.website'), "placeholder" => trans('product::product.placeholder.website'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'logo' => [ "type" => 'image', "label" => trans('product::product.label.logo'), "placeholder" => trans('product::product.placeholder.logo'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'cover_image' => [ "type" => 'image', "label" => trans('product::product.label.cover_image'), "placeholder" => trans('product::product.placeholder.cover_image'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'gallery' => [ "type" => 'images', "label" => trans('product::product.label.gallery'), "placeholder" => trans('product::product.placeholder.gallery'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'is_deal' => [ "type" => 'radios', "label" => trans('product::product.label.is_deal'), "placeholder" => trans('product::product.placeholder.is_deal'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'discounted_price' => [ "type" => 'decimal', "label" => trans('product::product.label.discounted_price'), "placeholder" => trans('product::product.placeholder.discounted_price'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'special_conditions' => [ "type" => 'text', "label" => trans('product::product.label.special_conditions'), "placeholder" => trans('product::product.placeholder.special_conditions'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'deal_valid_from' => [ "type" => 'date_time_picker', "label" => trans('product::product.label.deal_valid_from'), "placeholder" => trans('product::product.placeholder.deal_valid_from'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'deal_valid_to' => [ "type" => 'date_time_picker', "label" => trans('product::product.label.deal_valid_to'), "placeholder" => trans('product::product.placeholder.deal_valid_to'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'deal_publish_from' => [ "type" => 'date_time_picker', "label" => trans('product::product.label.deal_publish_from'), "placeholder" => trans('product::product.placeholder.deal_publish_from'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'deal_publish_to' => [ "type" => 'date_time_picker', "label" => trans('product::product.label.deal_publish_to'), "placeholder" => trans('product::product.placeholder.deal_publish_to'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'is_auction' => [ "type" => 'radios', "label" => trans('product::product.label.is_auction'), "placeholder" => trans('product::product.placeholder.is_auction'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'ads_auction_from' => [ "type" => 'date_time_picker', "label" => trans('product::product.label.ads_auction_from'), "placeholder" => trans('product::product.placeholder.ads_auction_from'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'ads_auction_to' => [ "type" => 'date_time_picker', "label" => trans('product::product.label.ads_auction_to'), "placeholder" => trans('product::product.placeholder.ads_auction_to'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }