@use('App\Models\Category', 'Category') @use('Illuminate\Support\Arr', 'Arr') {{-- Auto-hides the "New" button when rendered inside an AJAX modal. See x-input.company-select for the pattern. --}} @aware(['submitToSelect2' => false]) @props([ 'label', 'name', 'selected' => null, 'required' => false, 'multiple' => false, 'hideNewButton' => false, 'categoryType' => 'asset', 'id' => null, 'help_text' => null, ]) @php $selectId = $id ?? $name.'_select'; $hideNewButton = $hideNewButton || $submitToSelect2; @endphp
$errors->has($name), ]) >
@unless($hideNewButton)
@can('create', Category::class) {{ trans('button.new') }} @endcan
@endunless
@if ($help_text) {!! $help_text !!} @endif