Minor fixes, coding standards

This commit is contained in:
Ludovic CANDELLIER
2021-11-01 00:50:10 +01:00
parent e356b3fcda
commit 8aaab4345f
47 changed files with 133 additions and 114 deletions

View File

@@ -16,7 +16,7 @@ class Prices
public static function getByArticle($id)
{
$data['prices'] = Price::byArticle($id)->notGeneric()->get()->toArray();
$data['generics'] = Price::byArticle($id)->generic()->with(['generic.prices','generic.category'])->get()->toArray();
$data['generics'] = Price::byArticle($id)->generic()->with(['generic.prices', 'generic.category'])->get()->toArray();
return $data;
}
@@ -48,7 +48,7 @@ class Prices
return Price::create($data);
}
public static function update($data, $id = false)
public static function update($data, $id = false)
{
$id = $id ? $id : $data['id'];
$item = self::get($id);