File manager - Edit - /home/linknsbh/cecil-hotel.net/platform/plugins/hotel/src/Forms/PlaceForm.php
Back
<?php namespace Botble\Hotel\Forms; use Botble\Base\Enums\BaseStatusEnum; use Botble\Base\Forms\FormAbstract; use Botble\Hotel\Http\Requests\PlaceRequest; use Botble\Hotel\Models\Place; class PlaceForm extends FormAbstract { public function setup(): void { $this ->setupModel(new Place()) ->setValidatorClass(PlaceRequest::class) ->withCustomFields() ->add('name', 'text', [ 'label' => trans('core/base::forms.name'), 'required' => true, 'attr' => [ 'placeholder' => trans('core/base::forms.name_placeholder'), 'data-counter' => 120, ], ]) ->add('distance', 'text', [ 'label' => trans('plugins/hotel::place.form.distance'), 'required' => true, 'attr' => [ 'placeholder' => trans('plugins/hotel::place.form.distance_placeholder'), 'data-counter' => 200, ], ]) ->add('description', 'textarea', [ 'label' => trans('core/base::forms.description'), 'attr' => [ 'rows' => 4, 'placeholder' => trans('core/base::forms.description_placeholder'), 'data-counter' => 400, ], ]) ->add('content', 'editor', [ 'label' => trans('core/base::forms.content'), 'attr' => [ 'rows' => 4, 'placeholder' => trans('core/base::forms.description_placeholder'), 'with-short-code' => true, ], ]) ->add('status', 'customSelect', [ 'label' => trans('core/base::tables.status'), 'required' => true, 'attr' => [ 'class' => 'form-control select-full', ], 'choices' => BaseStatusEnum::labels(), ]) ->add('image', 'mediaImage') ->setBreakFieldPoint('status'); } }
| ver. 1.4 |
Github
|
.
| PHP 8.2.31 | Generation time: 0.11 |
proxy
|
phpinfo
|
Settings