Move category/category_name product::class methods into __get(), no functional changes

This commit is contained in:
2025-05-22 12:01:31 +10:00
parent 04ae35b1dd
commit 5ef1a27a64
23 changed files with 63 additions and 85 deletions

View File

@@ -42,7 +42,7 @@
<!-- PRODUCT -->
<x-leenooks::form.select id="product_id" name="broadband[product_id]" icon="fa-list" label="Product" :helper="$o->product->category_name" groupby="active"
:value="$np->id"
:options="Product::get()->filter(fn($item)=>$item->category === $np->category)->sortBy('name')->sortByDesc('active')->map(fn($item)=>['id'=>$item->id,'active'=>$item->active,'value'=>$item->name])" required/>
:options="Product::get()->filter(fn($item)=>$item->category_lc === $np->category_lc)->sortBy('name')->sortByDesc('active')->map(fn($item)=>['id'=>$item->id,'active'=>$item->active,'value'=>$item->name])" required/>
</div>
</div>