diff --git a/app/Exports/Botanic/Families.php b/app/Exports/Botanic/Families.php new file mode 100644 index 00000000..cb0f458d --- /dev/null +++ b/app/Exports/Botanic/Families.php @@ -0,0 +1,20 @@ +toArray(); + dump($data); + exit; + return view('Shop.home', $data); } } diff --git a/app/Menu/Shop.php b/app/Menu/Shop.php index 4ccec09e..63a8c41a 100644 --- a/app/Menu/Shop.php +++ b/app/Menu/Shop.php @@ -28,11 +28,12 @@ class Shop $menu->addTo('shop', 'Tags', [ 'route' => 'Shop.Admin.Tags.index', 'permission' => 'backend_access' ]) ->activeIfRoute(['Shop.Admin.Tags.*'])->order(7); - +/* $menu->addTo('shop', 'Réductions', [ 'route' => 'Shop.Admin.ArticleAttributeValues.index', 'permission' => 'backend_access' ]) ->activeIfRoute(['Shop.Admin.ArticleAttributeValues.*'])->order(8); $menu->addTo('shop', 'Stock', [ 'route' => 'Shop.Admin.ArticleAttributeValues.index', 'permission' => 'backend_access' ]) ->activeIfRoute(['Shop.Admin.ArticleAttributeValues.*'])->order(9); + */ $menu->addTo('shop', 'Prix génériques', [ 'route' => 'Shop.Admin.ArticlePriceGenerics.index', 'permission' => 'backend_access' ]) ->activeIfRoute(['Shop.Admin.ArticlePriceGenerics.*'])->order(10); diff --git a/app/Repositories/Shop/Articles.php b/app/Repositories/Shop/Articles.php index 78529c2a..4a5e4c95 100644 --- a/app/Repositories/Shop/Articles.php +++ b/app/Repositories/Shop/Articles.php @@ -47,6 +47,11 @@ class Articles return $data; } + public static function getByCategory($category_id) + { + return Article::with(['prices.article_attribute.attribute_value'])->get(); + } + public static function getCategoriesByArticle($article) { return $article->categories->pluck('id')->toArray();