Lager-v3/resources/views/Partials/Form/Input/building.blade.php

28 lines
942 B
PHP

<div class="mb-3 row">
<label for="building_input" class="col-2 col-form-label fw-bold">@lang('building') : </label>
<div class="col-10">
<select name="building_id" id="building_input" class="form-select">
@foreach($buildings as $building)
<option
value="{{$building->id}}"
@if(old('building_id') !== null)
@if($building->id == old('building_id'))
selected
@endif
@else
@if(isset($data))
@if($building->id == $data->building->id)
selected
@endif
@endif
@endif
>
{{$building->name}}
</option>
@endforeach
</select>
</div>
</div>