Hello, I'm extending plugin
I have some fields dropdown type
In the backend everything works correct
But in frontend, I get number
My code:
public function boot()
{
...
RealtiesControllers::extendFormFields(function ($form, $model, $context) {
if (!$model instanceof RealtyModel) {
return;
}
$form->addTabFields([
'bathroom' => [
'label' => 'Bathroom',
'tab' => 'Standart Property',
'type' => 'dropdown',
'span' => 'storm',
'cssClass' => 'col-xs-4',
'options' => array('shared', 'separate'),
],
...
I found some solution:
public function getSampleAttribute()
{
$value = array_get($this->attributes, 'sample');
return array_get($this->getSampleOptions(), $value);
}
but how it can be applied to extending plugin ??? Thank you in advance.