Fix for accessing an object instead of an array

This commit is contained in:
Gamerboy59 2023-09-09 16:13:13 +02:00 committed by GitHub
parent ec2947936b
commit 3f4c46edbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -3,8 +3,8 @@
<select class="form-control" name="{{$name ?? 'location_id'}}"> <select class="form-control" name="{{$name ?? 'location_id'}}">
@foreach ($locations as $location) @foreach ($locations as $location)
<option <option
value="{{ $location->id }}" {{(isset($current) && (string)$current === (string)$location->id)? 'selected' : ''}}> value="{{ $location['id'] }}" {{(isset($current) && (string)$current === (string)$location['id'])? 'selected' : ''}}>
{{ $location->name }} {{ $location['name'] }}
</option> </option>
@endforeach @endforeach
</select> </select>

View File

@ -2,8 +2,8 @@
<div class="input-group-prepend"><span class="input-group-text">{{ $title ??'OS'}}</span></div> <div class="input-group-prepend"><span class="input-group-text">{{ $title ??'OS'}}</span></div>
<select class="form-control" name="{{$name ?? 'os_id'}}"> <select class="form-control" name="{{$name ?? 'os_id'}}">
@foreach ($os as $o) @foreach ($os as $o)
<option value="{{ $o->id }}" {{(isset($current) && (string)$current === (string)$o->id)? 'selected' : ''}}> <option value="{{ $o['id'] }}" {{(isset($current) && (string)$current === (string)$o['id'])? 'selected' : ''}}>
{{ $o->name }} {{ $o['name'] }}
</option> </option>
@endforeach @endforeach
</select> </select>

View File

@ -2,8 +2,8 @@
<div class="input-group-prepend"><span class="input-group-text">{{ $title ??'Provider'}}</span></div> <div class="input-group-prepend"><span class="input-group-text">{{ $title ??'Provider'}}</span></div>
<select class="form-control" name="{{$name ?? 'provider_id'}}"> <select class="form-control" name="{{$name ?? 'provider_id'}}">
@foreach ($providers as $provider) @foreach ($providers as $provider)
<option value="{{ $provider->id }}" {{(isset($current) && (string)$current === (string)$provider->id)? 'selected' : ''}}> <option value="{{ $provider['id'] }}" {{(isset($current) && (string)$current === (string)$provider['id'])? 'selected' : ''}}>
{{ $provider->name }} {{ $provider['name'] }}
</option> </option>
@endforeach @endforeach
</select> </select>