how to manage select option if we want to do that a component
@Tuto1902 Жыл бұрын
it would look something like this: @props(['options', 'selected' => null]) @php $class = $errors->has($attributes->get('name')) ? '...' : '...' @endphp merge(['class' => $class]) }}> Select a Category @foreach ($options as $value => $label) {{ $label }} @endforeach and you would use it in the form like this If you want, you can follow me on Discord and I can provide better code and answer your questions more easily: discord.gg/xyJMj6mRmn