fix on tags
This commit is contained in:
@@ -30,6 +30,20 @@ class Merchandises
|
||||
return $export;
|
||||
}
|
||||
|
||||
public static function getFull($id)
|
||||
{
|
||||
$merchandise = self::get($id);
|
||||
$data = $merchandise->toArray();
|
||||
$data['tags'] = self::getTagsByMerchandise($merchandise);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public static function getTagsByMerchandise($merchandise)
|
||||
{
|
||||
return Tag::getTagsByModel($merchandise);
|
||||
}
|
||||
|
||||
public static function getPrices($id)
|
||||
{
|
||||
return Merchandise::with(['price_lists.price_list_values', 'price_lists.sale_channel'])->find($id);
|
||||
|
||||
Reference in New Issue
Block a user