dijkr / Copia

Laravel-project with CMS
0 stars 0 forks source link

Ignore null, so the code does not run. #26

Closed dijkr closed 1 year ago

dijkr commented 1 year ago

Whenever foreach for grouped products is called, and the result is null, a empty block for the subcategory is displayed.

dijkr commented 1 year ago

First, to not display an empty block, the view(s) has been modified. When the $searchResults variable is null, the foreach does not run.

{{ if searchResults }}
{{ /if }}