This commit is contained in:
Ludovic CANDELLIER
2021-10-26 21:51:47 +02:00
parent e040837ce6
commit fae7b7897f

View File

@@ -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;