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'}}">
@foreach ($locations as $location)
<option
value="{{ $location->id }}" {{(isset($current) && (string)$current === (string)$location->id)? 'selected' : ''}}>
{{ $location->name }}
value="{{ $location['id'] }}" {{(isset($current) && (string)$current === (string)$location['id'])? 'selected' : ''}}>
{{ $location['name'] }}
</option>
@endforeach
</select>

View File

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

View File

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