This commit is contained in:
ludo
2024-01-28 20:28:39 +01:00
8 changed files with 60 additions and 100 deletions

View File

@@ -1,27 +0,0 @@
<?php
namespace App\Repositories\Shop;
use App\Models\Shop\Price;
use App\Traits\Model\Basic;
class Prices
{
use Basic;
public static function getByArticle($id)
{
return [
'prices' => Price::byArticle($id)->notGeneric()->get()->toArray(),
'generics' => Price::byArticle($id)->generic()->with([
'generic.prices',
'generic.category',
])->get()->toArray(),
];
}
public static function getModel()
{
return Price::query();
}
}