Answers for "laravel old input select"

PHP
1

how to use old for select in blade laravel

<select name="example">
<option {{ old('example') == $value ? "selected" : "" }} value="{{ $value }}">{{$label}}</option>
Posted by: Guest on October-01-2021
0

laravel old value for select option

@foreach($services as $service)
	@if (old('category') == $service->id)
  		<option value="{{ $service->id }}" selected>{{ $service->title }}</option>
  	@else
		<option value="{{ $service->id }}">{{ $service->title }}</option>
	@endif
@endforeach
Posted by: Guest on May-29-2020

Browse Popular Code Answers by Language