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" => 'numeric', "label" => trans('education::education.label.title'), "placeholder" => trans('education::education.placeholder.title'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'country_id' => [ "type" => 'numeric', "label" => trans('education::education.label.country_id'), "placeholder" => trans('education::education.placeholder.country_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'state_id' => [ "type" => 'numeric', "label" => trans('education::education.label.state_id'), "placeholder" => trans('education::education.placeholder.state_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'city_id' => [ "type" => 'numeric', "label" => trans('education::education.label.city_id'), "placeholder" => trans('education::education.placeholder.city_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'zipcode' => [ "type" => 'text', "label" => trans('education::education.label.zipcode'), "placeholder" => trans('education::education.placeholder.zipcode'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'street' => [ "type" => 'text', "label" => trans('education::education.label.street'), "placeholder" => trans('education::education.placeholder.street'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'street_no' => [ "type" => 'numeric', "label" => trans('education::education.label.street_no'), "placeholder" => trans('education::education.placeholder.street_no'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'address' => [ "type" => 'text', "label" => trans('education::education.label.address'), "placeholder" => trans('education::education.placeholder.address'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'venue' => [ "type" => 'text', "label" => trans('education::education.label.venue'), "placeholder" => trans('education::education.placeholder.venue'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'price' => [ "type" => 'numeric', "label" => trans('education::education.label.price'), "placeholder" => trans('education::education.placeholder.price'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'date_and_time' => [ "type" => 'date_time_picker', "label" => trans('education::education.label.date_and_time'), "placeholder" => trans('education::education.placeholder.date_and_time'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'website' => [ "type" => 'text', "label" => trans('education::education.label.website'), "placeholder" => trans('education::education.placeholder.website'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'topics' => [ "type" => 'text', "label" => trans('education::education.label.topics'), "placeholder" => trans('education::education.placeholder.topics'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'brands' => [ "type" => 'text', "label" => trans('education::education.label.brands'), "placeholder" => trans('education::education.placeholder.brands'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'target_groups' => [ "type" => 'text', "label" => trans('education::education.label.target_groups'), "placeholder" => trans('education::education.placeholder.target_groups'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'tags' => [ "type" => 'text', "label" => trans('education::education.label.tags'), "placeholder" => trans('education::education.placeholder.tags'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'description' => [ "type" => 'text', "label" => trans('education::education.label.description'), "placeholder" => trans('education::education.placeholder.description'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'images' => [ "type" => 'images', "label" => trans('education::education.label.images'), "placeholder" => trans('education::education.placeholder.images'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'is_auction' => [ "type" => 'select', "label" => trans('education::education.label.is_auction'), "placeholder" => trans('education::education.placeholder.is_auction'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'ads_auction_from' => [ "type" => 'date_time_picker', "label" => trans('education::education.label.ads_auction_from'), "placeholder" => trans('education::education.placeholder.ads_auction_from'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'ads_auction_to' => [ "type" => 'date_time_picker', "label" => trans('education::education.label.ads_auction_to'), "placeholder" => trans('education::education.placeholder.ads_auction_to'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }