@php $without_label = false; $enable_insert = false; if (Ui::keyset($attributes, 'without_label') != null) { $without_label = $attributes['without_label']; } if ( Ui::keyset($attributes, 'layout') == null || (Ui::keyset($attributes, 'layout') != null && $attributes['layout'] == 'h') ) { $horizental = true; $row = ' row'; $labelClass = 'col-2 col-form-label'; } else { $horizental = false; $row = ''; $labelClass = 'col-form-label'; } if (is_array($list) /* && count($list)>0 */) { $_list = []; if ( isset($attributes['is_hidden']) && $attributes['is_hidden'] == true && array_search('data-is-related', $attributes) === false ) { } else { $_list = ['' => 'Select one Item']; } foreach ($list as $k => $v) { $_list[$k] = $v; } $list = $_list; } if (isset($attributes['enable_insert']) && $attributes['enable_insert']) { $enable_insert = $attributes['enable_insert']; } if (isset($attributes['modelName'])) { if ( auth() ->user() ->can('insert_' . strtolower($attributes['modelName'])) ) { if ($enable_insert) { $parentModelName = $attributes['modelName']; $x = '\\App\\Models\\' . $parentModelName; $parentModel = new $x(); $parentFields = \App\Helpers\Form::getModalFormFields($parentModel); } } } $required_append = ''; /* if ( isset($attributes) && is_array($attributes) && isset($attributes['required']) && $attributes['required'] === true ) { $required_append = ' *'; } */ $random_modal_id = \Str::random(); if (isset($attributes['required']) && $attributes['required'] === true) { $labelClass .= ' required'; } @endphp @push('head') @endpush