[WIP] Refactor generic & normal price

This commit is contained in:
Ludovic CANDELLIER
2020-08-31 23:23:55 +02:00
parent c9198de890
commit c025dbb385
18 changed files with 267 additions and 32 deletions

View File

@@ -16,8 +16,7 @@ class Prices
public static function getByArticle($id)
{
$prices = Article::byArticle($id)->with('prices.price')->get()->pluck('prices')->toArray()[0];
// dump($prices);
$prices = Price::byArticle($id)->with('price')->get()->toArray();
$data = [];
foreach ($prices as $price)
{
@@ -32,7 +31,7 @@ class Prices
}
}
}
dump($data);
return $data;
}
public static function getDatatable()