Fix
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user