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

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;