A lot of things
This commit is contained in:
13
resources/views/components/news-category-selector.blade.php
Normal file
13
resources/views/components/news-category-selector.blade.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php /** @var \App\Models\Category $category */ ?>
|
||||
<div class="form-group">
|
||||
<select class="form-select" name="category">
|
||||
<option value="" disabled {{ empty($selected) ? 'selected' : '' }} hidde*>
|
||||
Select a category...
|
||||
</option>
|
||||
@foreach($categories as $category)
|
||||
<option value="{{ $category->id }}" {{ in_array($category->id, (array) $selected) ? 'selected' : '' }}>
|
||||
{{ $category->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
Reference in New Issue
Block a user