diff --git a/app/Http/Controllers/Shop/ArticleController.php b/app/Http/Controllers/Shop/ArticleController.php index 3acefcb8..b7ee3e8b 100644 --- a/app/Http/Controllers/Shop/ArticleController.php +++ b/app/Http/Controllers/Shop/ArticleController.php @@ -14,8 +14,6 @@ class ArticleController extends Controller { $data = self::init(); $data['article'] = Articles::getArticleToSell($id); - dump($data); - exit; return view('Shop.Articles.show', $data); } } diff --git a/app/Repositories/Shop/Articles.php b/app/Repositories/Shop/Articles.php index bec27793..adb78f10 100644 --- a/app/Repositories/Shop/Articles.php +++ b/app/Repositories/Shop/Articles.php @@ -31,7 +31,7 @@ class Articles { $article_ids = self::getSiblingsIds($id); $offers = Offers::getOffersByArticles($article_ids); - dump($offers->toArray()); + // dump($offers->toArray()); foreach ($offers as $offer) { $data[$offer->article_nature->name][] = [ 'name' => $offer->variation->name, @@ -344,8 +344,8 @@ class Articles public static function store($data) { - $id = isset($data['id']) ? $data['id'] : false; - return $id ? self::update($data, $id) : self::create($data); + $data['visible'] = $data['visible'] ?? false; + return ($data['id'] ?? false) ? self::update($data) : self::create($data); } public static function create($data) diff --git a/resources/views/Admin/Shop/Articles/form.blade.php b/resources/views/Admin/Shop/Articles/form.blade.php index d98c00fc..4708882c 100644 --- a/resources/views/Admin/Shop/Articles/form.blade.php +++ b/resources/views/Admin/Shop/Articles/form.blade.php @@ -37,10 +37,15 @@