<select name="location_id"  class="form-control select2" required>
<option value="">--Select--</option>
@if(isset($except))
@foreach(\App\Models\Location::Withoutwarehouse()->active()->get() as $location)
	<option value="{{$location->id}}" {{isset($selected_id) ? ($selected_id == $location->id ? 'selected' : '') : (old('location_id') == $location->id ? 'selected' : '')}}>{{$location->room_name}}</option>
@endforeach
@else
@foreach(\App\Models\Location::orderBy('room_name','ASC')->active()->get() as $location)
	<option value="{{$location->id}}" {{isset($selected_id) ? ($selected_id == $location->id ? 'selected' : '') : (old('location_id') == $location->id ? 'selected' : '')}}>{{$location->room_name}}</option>
@endforeach
@endif
</select>
