fix on empty articles
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
Il y a {{ count($articles) ?? 0 }} article(s) dans la liste
|
||||
Il y a {{ $articles ? count($articles) : 0 }} article(s) dans la liste
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<div class="row">
|
||||
@foreach ($articles as $product_name => $article)
|
||||
<div class="col-sm-3 col-lg-2">
|
||||
@include('Shop.Articles.partials.article')
|
||||
</div>
|
||||
@endforeach
|
||||
@if ($articles)
|
||||
@foreach ($articles as $product_name => $article)
|
||||
<div class="col-sm-3 col-lg-2">
|
||||
@include('Shop.Articles.partials.article')
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
@@ -1,3 +1,5 @@
|
||||
@foreach ($articles as $product_name => $article)
|
||||
@include('Shop.Articles.partials.article_rows')
|
||||
@endforeach
|
||||
@if ($articles)
|
||||
@foreach ($articles as $product_name => $article)
|
||||
@include('Shop.Articles.partials.article_rows')
|
||||
@endforeach
|
||||
@endif
|
||||
Reference in New Issue
Block a user