How to keep old value in select option when I updated the form?
Form:
<select class="form-select" name="slug" id="slug" value="{{$project->slug ?? '' }}">
<option value="">Select Category </option>
<option value="commercial">commercial</option>
</select>
2
Answers
You can use
old()
like thisSimply use
@selected(bool)
, and if the condition is true it will return selected.