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('medium::media.label.title'), "placeholder" => trans('medium::media.placeholder.title'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'media_type' => [ "type" => 'text', "label" => trans('medium::media.label.media_type'), "placeholder" => trans('medium::media.placeholder.media_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'country_id' => [ "type" => 'numeric', "label" => trans('medium::media.label.country_id'), "placeholder" => trans('medium::media.placeholder.country_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'state_id' => [ "type" => 'numeric', "label" => trans('medium::media.label.state_id'), "placeholder" => trans('medium::media.placeholder.state_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'city_id' => [ "type" => 'numeric', "label" => trans('medium::media.label.city_id'), "placeholder" => trans('medium::media.placeholder.city_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'zipcode' => [ "type" => 'text', "label" => trans('medium::media.label.zipcode'), "placeholder" => trans('medium::media.placeholder.zipcode'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'street' => [ "type" => 'text', "label" => trans('medium::media.label.street'), "placeholder" => trans('medium::media.placeholder.street'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'street_no' => [ "type" => 'numeric', "label" => trans('medium::media.label.street_no'), "placeholder" => trans('medium::media.placeholder.street_no'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'website' => [ "type" => 'text', "label" => trans('medium::media.label.website'), "placeholder" => trans('medium::media.placeholder.website'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'mediadata' => [ "type" => 'text', "label" => trans('medium::media.label.mediadata'), "placeholder" => trans('medium::media.placeholder.mediadata'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'distribution_area_id' => [ "type" => 'numeric', "label" => trans('medium::media.label.distribution_area_id'), "placeholder" => trans('medium::media.placeholder.distribution_area_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'brand_id' => [ "type" => 'numeric', "label" => trans('medium::media.label.brand_id'), "placeholder" => trans('medium::media.placeholder.brand_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'profile' => [ "type" => 'text', "label" => trans('medium::media.label.profile'), "placeholder" => trans('medium::media.placeholder.profile'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'images' => [ "type" => 'text', "label" => trans('medium::media.label.images'), "placeholder" => trans('medium::media.placeholder.images'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'logo' => [ "type" => 'text', "label" => trans('medium::media.label.logo'), "placeholder" => trans('medium::media.placeholder.logo'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'targetgroups' => [ "type" => 'text', "label" => trans('medium::media.label.targetgroups'), "placeholder" => trans('medium::media.placeholder.targetgroups'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'targetgroup_description' => [ "type" => 'text', "label" => trans('medium::media.label.targetgroup_description'), "placeholder" => trans('medium::media.placeholder.targetgroup_description'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }