{{-- expected attributes: name --}} @props([ 'prevVals' => false, 'vals' => false, 'labelClass' => '', 'selectClass' => '', 'errorClass' => '', 'size' => 6, 'label', ]) @php $id = $attributes['id'] ?? rtrim($attributes['name'], '[]'); $selected = null; $name = rtrim($attributes['name'], '[]'); if (old($name) != null) { $selected = collect(old($name)); } else if ($prevVals) { $selected = collect($prevVals); } if (!$vals) { switch ($name) { case 'status': $vals = ['upcoming', 'current']; break; default: break; } } @endphp @error($attributes['name'])

{{ $message }}

@enderror