This content originally appeared on DEV Community and was authored by Sospeter Mongare
<div class="form-group">
<label for="category_id">Transaction category</label>
<select class="form-control" id="category_id" name="category_id" required>
@foreach($categories as $category)
<option value="{{ $category->id }}" {{ $transaction->category_id == $category->id ? 'selected' : '' }}>
{{ $category->name }}
</option>
@endforeach
</select>
</div>
This content originally appeared on DEV Community and was authored by Sospeter Mongare
Sospeter Mongare | Sciencx (2024-06-22T12:48:19+00:00) Display dropdown in blade in laravel. Retrieved from https://www.scien.cx/2024/06/22/display-dropdown-in-blade-in-laravel/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.