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' => [ 'parentcategory_id' => [ "type" => 'numeric', "label" => trans('classified::classified.label.parentcategory_id'), "placeholder" => trans('classified::classified.placeholder.parentcategory_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'category_id' => [ "type" => 'numeric', "label" => trans('classified::classified.label.category_id'), "placeholder" => trans('classified::classified.placeholder.category_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'country_id' => [ "type" => 'numeric', "label" => trans('classified::classified.label.country_id'), "placeholder" => trans('classified::classified.placeholder.country_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'state_id' => [ "type" => 'numeric', "label" => trans('classified::classified.label.state_id'), "placeholder" => trans('classified::classified.placeholder.state_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'district_id' => [ "type" => 'numeric', "label" => trans('classified::classified.label.district_id'), "placeholder" => trans('classified::classified.placeholder.district_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'area_id' => [ "type" => 'numeric', "label" => trans('classified::classified.label.area_id'), "placeholder" => trans('classified::classified.placeholder.area_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'location_id' => [ "type" => 'numeric', "label" => trans('classified::classified.label.location_id'), "placeholder" => trans('classified::classified.placeholder.location_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'title' => [ "type" => 'text', "label" => trans('classified::classified.label.title'), "placeholder" => trans('classified::classified.placeholder.title'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'description' => [ "type" => 'text', "label" => trans('classified::classified.label.description'), "placeholder" => trans('classified::classified.placeholder.description'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'ad_status' => [ "type" => 'select', "label" => trans('classified::classified.label.ad_status'), "placeholder" => trans('classified::classified.placeholder.ad_status'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'Features' => [ "type" => 'text', "label" => trans('classified::classified.label.Features'), "placeholder" => trans('classified::classified.placeholder.Features'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'Details' => [ "type" => 'text', "label" => trans('classified::classified.label.Details'), "placeholder" => trans('classified::classified.placeholder.Details'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'price' => [ "type" => 'decimal', "label" => trans('classified::classified.label.price'), "placeholder" => trans('classified::classified.placeholder.price'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'expire_date' => [ "type" => 'date_picker', "label" => trans('classified::classified.label.expire_date'), "placeholder" => trans('classified::classified.placeholder.expire_date'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'payment_mode' => [ "type" => 'text', "label" => trans('classified::classified.label.payment_mode'), "placeholder" => trans('classified::classified.placeholder.payment_mode'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'email' => [ "type" => 'email', "label" => trans('classified::classified.label.email'), "placeholder" => trans('classified::classified.placeholder.email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'images' => [ "type" => 'images', "label" => trans('classified::classified.label.images'), "placeholder" => trans('classified::classified.placeholder.images'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'viewcount' => [ "type" => 'numeric', "label" => trans('classified::classified.label.viewcount'), "placeholder" => trans('classified::classified.placeholder.viewcount'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'status' => [ "type" => 'select', "label" => trans('classified::classified.label.status'), "placeholder" => trans('classified::classified.placeholder.status'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'upload_folder' => [ "type" => 'file', "label" => trans('classified::classified.label.upload_folder'), "placeholder" => trans('classified::classified.placeholder.upload_folder'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }