add offers count, & minor fixes code standards
This commit is contained in:
@@ -172,7 +172,7 @@ class Articles
|
||||
|
||||
public static function getByCategory($category_id)
|
||||
{
|
||||
return Article::byCategory($category_id)->with(['prices','product','image'])->get();
|
||||
return Article::byCategory($category_id)->with(['prices', 'product', 'image'])->get();
|
||||
}
|
||||
|
||||
public static function getCategoriesByArticle($article)
|
||||
@@ -223,7 +223,6 @@ class Articles
|
||||
self::storeImages($article, $images);
|
||||
self::storeCategories($article, $categories);
|
||||
self::storeTags($article, $tags);
|
||||
self::storePrices($article, $prices);
|
||||
return $article->id;
|
||||
}
|
||||
|
||||
@@ -270,11 +269,6 @@ class Articles
|
||||
return Tag::storeTags($article, $tags);
|
||||
}
|
||||
|
||||
public static function storePrices($article, $prices)
|
||||
{
|
||||
return ArticlePrices::storePrices($article->id, $prices);
|
||||
}
|
||||
|
||||
public static function storeImages($article, $files)
|
||||
{
|
||||
return Medias::storeImages($article, $files);
|
||||
|
||||
Reference in New Issue
Block a user