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' => [ 'country_id' => [ "type" => 'numeric', "label" => trans('automobile::automobile.label.country_id'), "placeholder" => trans('automobile::automobile.placeholder.country_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'state_id' => [ "type" => 'numeric', "label" => trans('automobile::automobile.label.state_id'), "placeholder" => trans('automobile::automobile.placeholder.state_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'district_id' => [ "type" => 'numeric', "label" => trans('automobile::automobile.label.district_id'), "placeholder" => trans('automobile::automobile.placeholder.district_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'city_id' => [ "type" => 'numeric', "label" => trans('automobile::automobile.label.city_id'), "placeholder" => trans('automobile::automobile.placeholder.city_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'location_id' => [ "type" => 'numeric', "label" => trans('automobile::automobile.label.location_id'), "placeholder" => trans('automobile::automobile.placeholder.location_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'make_id' => [ "type" => 'numeric', "label" => trans('automobile::automobile.label.make_id'), "placeholder" => trans('automobile::automobile.placeholder.make_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'model_id' => [ "type" => 'numeric', "label" => trans('automobile::automobile.label.model_id'), "placeholder" => trans('automobile::automobile.placeholder.model_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'name' => [ "type" => 'text', "label" => trans('automobile::automobile.label.name'), "placeholder" => trans('automobile::automobile.placeholder.name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'type' => [ "type" => 'radios', "label" => trans('automobile::automobile.label.type'), "placeholder" => trans('automobile::automobile.placeholder.type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'releaseyear' => [ "type" => 'date_picker', "label" => trans('automobile::automobile.label.releaseyear'), "placeholder" => trans('automobile::automobile.placeholder.releaseyear'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'color' => [ "type" => 'text', "label" => trans('automobile::automobile.label.color'), "placeholder" => trans('automobile::automobile.placeholder.color'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'mileage' => [ "type" => 'text', "label" => trans('automobile::automobile.label.mileage'), "placeholder" => trans('automobile::automobile.placeholder.mileage'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'price' => [ "type" => 'decimal', "label" => trans('automobile::automobile.label.price'), "placeholder" => trans('automobile::automobile.placeholder.price'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'transmission' => [ "type" => 'radios', "label" => trans('automobile::automobile.label.transmission'), "placeholder" => trans('automobile::automobile.placeholder.transmission'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'fuel_type' => [ "type" => 'radios', "label" => trans('automobile::automobile.label.fuel_type'), "placeholder" => trans('automobile::automobile.placeholder.fuel_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'description' => [ "type" => 'text', "label" => trans('automobile::automobile.label.description'), "placeholder" => trans('automobile::automobile.placeholder.description'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'conditionn' => [ "type" => 'radios', "label" => trans('automobile::automobile.label.conditionn'), "placeholder" => trans('automobile::automobile.placeholder.conditionn'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'engine' => [ "type" => 'radios', "label" => trans('automobile::automobile.label.engine'), "placeholder" => trans('automobile::automobile.placeholder.engine'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'features' => [ "type" => 'text', "label" => trans('automobile::automobile.label.features'), "placeholder" => trans('automobile::automobile.placeholder.features'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'address' => [ "type" => 'text', "label" => trans('automobile::automobile.label.address'), "placeholder" => trans('automobile::automobile.placeholder.address'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'neighborhood' => [ "type" => 'text', "label" => trans('automobile::automobile.label.neighborhood'), "placeholder" => trans('automobile::automobile.placeholder.neighborhood'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'zip' => [ "type" => 'text', "label" => trans('automobile::automobile.label.zip'), "placeholder" => trans('automobile::automobile.placeholder.zip'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'images' => [ "type" => 'text', "label" => trans('automobile::automobile.label.images'), "placeholder" => trans('automobile::automobile.placeholder.images'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'viewcount' => [ "type" => 'numeric', "label" => trans('automobile::automobile.label.viewcount'), "placeholder" => trans('automobile::automobile.placeholder.viewcount'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'slider' => [ "type" => 'numeric', "label" => trans('automobile::automobile.label.slider'), "placeholder" => trans('automobile::automobile.placeholder.slider'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }