No longer need to test for type, it should exist

This commit is contained in:
2023-05-03 23:41:48 +10:00
parent 25dab73a83
commit a5238bfbdc
6 changed files with 19 additions and 8 deletions

View File

@@ -7,7 +7,7 @@
@php
$po = $selected = NULL;
@endphp
@foreach (\App\Models\Product::active()->get()->filter(function($item) { return $item->type && (get_class($item->type) == 'App\Models\Product\Broadband'); })->sortBy('name') as $o)
@foreach (\App\Models\Product::active()->get()->filter(function($item) { return get_class($item->type) === 'App\Models\Product\Broadband'; })->sortBy('name') as $o)
@php
if ($o->id == old('product_id')) {
$selected = 'selected';