Use map() instead of transform(), use fn() instead of function(), consistent coding for form.select
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
@if(($x=Supplier::active()->whereNotIn('id',$o->suppliers->pluck('id'))->orderBy('name')->get())->count())
|
||||
@if(($x=Supplier::active()->whereNotIn('id',$o->suppliers->pluck('id'))->orderBy(DB::raw('UPPER(name)'))->get())->count())
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<x-leenooks::form.select id="supplier_id" name="supplier_id" icon="fa-handshake" label="Add Supplier" :options="$x->map(function($item) { $item->value = $item->name; return $item; })->toArray()"/>
|
||||
<x-leenooks::form.select id="supplier_id" name="supplier_id" icon="fa-handshake" label="Add Supplier" :options="$x->map(fn($item)=>['id'=>$item->id,'value'=>$item->name])"/>
|
||||
</div>
|
||||
|
||||
<div class="col-4">
|
||||
|
Reference in New Issue
Block a user