Use map() instead of transform(), use fn() instead of function(), consistent coding for form.select
This commit is contained in:
@@ -367,7 +367,7 @@ class Product extends Model implements IDs
|
||||
return round($price,2);
|
||||
}
|
||||
|
||||
public function accounting(string $provider): Collection
|
||||
public function accounting(): Collection
|
||||
{
|
||||
$so = ProviderOauth::where('name',self::provider)
|
||||
->sole();
|
||||
@@ -379,7 +379,7 @@ class Product extends Model implements IDs
|
||||
->API()
|
||||
->getItems()
|
||||
->pluck('pid','Id')
|
||||
->transform(fn($item,$value)=>['id'=>$value,'value'=>$item])
|
||||
->map(fn($item,$value)=>['id'=>$value,'value'=>$item])
|
||||
->values();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user