diff --git a/app/Repositories/Shop/Articles.php b/app/Repositories/Shop/Articles.php index 1a11b408..c3d09fe6 100644 --- a/app/Repositories/Shop/Articles.php +++ b/app/Repositories/Shop/Articles.php @@ -32,7 +32,7 @@ class Articles { $articles = Article::with(['article_nature'])->get(); foreach ($articles as $article) { - $data[$article->id] = $article->article_nature->name . ' - ' . $article->name; + $data[$article->id] = ($article->article_nature->name ?? null) . ' - ' . $article->name; } asort($data, SORT_NATURAL); return $data;