@use(App\Models\TLD)

<fieldset class="form-group">
	<label class="col-md-12">DOMAIN</label>

	<div class="form-group col-sm-6 {{ $errors->has('options.domain') ? 'has-error' : '' }}">
		<label for="options.domain">Domain Name</label>
		<input type="text" class="form-control" id="options.domain" name="options[domain]" placeholder="Domain Name" value="{{ old('options.domain') }}">
		<span class="help-block">{{ $errors->first('options.domain') }}</span>
	</div>

	<div class="form-group col-sm-6 {{ $errors->has('options.tld_id') ? 'has-error' : '' }}">
		<label for="options.tld_id">Domain TLD</label>
		<select style="width:25%;" class="form-control @error('options.tld_id') is-invalid @enderror" id="options.tld_id" name="options[tld_id]">
			@foreach(TLD::orderBy('name')->get() as $oo)
				<option value="{{ $oo->id }}" @selected($oo->id == old('options.tld_id',$pdo->tld_id))>{{ $oo->name }}</option>
			@endforeach
		</select>
		<span class="help-block">{{ $errors->first('options.tld') }}</span>
	</div>
</fieldset>