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' => [ 'business_id' => [ "type" => 'text', "label" => trans('claim::claim.label.business_id'), "placeholder" => trans('claim::claim.placeholder.business_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'alias' => [ "type" => 'text', "label" => trans('claim::claim.label.alias'), "placeholder" => trans('claim::claim.placeholder.alias'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'name' => [ "type" => 'text', "label" => trans('claim::claim.label.name'), "placeholder" => trans('claim::claim.placeholder.name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'image_url' => [ "type" => 'text', "label" => trans('claim::claim.label.image_url'), "placeholder" => trans('claim::claim.placeholder.image_url'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'is_claimed' => [ "type" => 'text', "label" => trans('claim::claim.label.is_claimed'), "placeholder" => trans('claim::claim.placeholder.is_claimed'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'is_closed' => [ "type" => 'text', "label" => trans('claim::claim.label.is_closed'), "placeholder" => trans('claim::claim.placeholder.is_closed'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'url' => [ "type" => 'text', "label" => trans('claim::claim.label.url'), "placeholder" => trans('claim::claim.placeholder.url'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'phone' => [ "type" => 'text', "label" => trans('claim::claim.label.phone'), "placeholder" => trans('claim::claim.placeholder.phone'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'display_phone' => [ "type" => 'text', "label" => trans('claim::claim.label.display_phone'), "placeholder" => trans('claim::claim.placeholder.display_phone'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'review_count' => [ "type" => 'numeric', "label" => trans('claim::claim.label.review_count'), "placeholder" => trans('claim::claim.placeholder.review_count'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'categories' => [ "type" => 'text', "label" => trans('claim::claim.label.categories'), "placeholder" => trans('claim::claim.placeholder.categories'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'rating' => [ "type" => 'numeric', "label" => trans('claim::claim.label.rating'), "placeholder" => trans('claim::claim.placeholder.rating'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'location' => [ "type" => 'text', "label" => trans('claim::claim.label.location'), "placeholder" => trans('claim::claim.placeholder.location'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'city' => [ "type" => 'text', "label" => trans('claim::claim.label.city'), "placeholder" => trans('claim::claim.placeholder.city'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'latitude' => [ "type" => 'decimal', "label" => trans('claim::claim.label.latitude'), "placeholder" => trans('claim::claim.placeholder.latitude'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'longitude' => [ "type" => 'decimal', "label" => trans('claim::claim.label.longitude'), "placeholder" => trans('claim::claim.placeholder.longitude'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'coordinates' => [ "type" => 'text', "label" => trans('claim::claim.label.coordinates'), "placeholder" => trans('claim::claim.placeholder.coordinates'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'photos' => [ "type" => 'text', "label" => trans('claim::claim.label.photos'), "placeholder" => trans('claim::claim.placeholder.photos'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'hours' => [ "type" => 'text', "label" => trans('claim::claim.label.hours'), "placeholder" => trans('claim::claim.placeholder.hours'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'transactions' => [ "type" => 'text', "label" => trans('claim::claim.label.transactions'), "placeholder" => trans('claim::claim.placeholder.transactions'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'messaging' => [ "type" => 'text', "label" => trans('claim::claim.label.messaging'), "placeholder" => trans('claim::claim.placeholder.messaging'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'otp' => [ "type" => 'text', "label" => trans('claim::claim.label.otp'), "placeholder" => trans('claim::claim.placeholder.otp'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'otp_generated_time' => [ "type" => 'date_time_picker', "label" => trans('claim::claim.label.otp_generated_time'), "placeholder" => trans('claim::claim.placeholder.otp_generated_time'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }