Created
February 8, 2021 20:13
-
-
Save NandoKstroNet/112b1c6b83c794b8e36efd940f2a3803 to your computer and use it in GitHub Desktop.
Conteúdo do curso Livewire na Prática - http://codeexperts.com.br
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="w-full px-3 mb-6 md:mb-0"> | |
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2">Categorias</label> | |
<select id="categories" wire:model="expense.categories" | |
class="block appearance-none w-full bg-gray-200 border @error('expense.categories.*') border-red-500 @else border-gray-200 @enderror text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500" multiple> | |
@foreach(\App\Models\Category::all(['id', 'name']) as $category) | |
<option value="{{$category->id}}">{{$category->name}}</option> | |
@endforeach | |
</select> | |
@error('expense.categories.*') | |
<h5 class="text-red-500 text-xs italic">{{$message}}</h5> | |
@enderror | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment