Skip to content

Commit

Permalink
Fixed twig examples
Browse files Browse the repository at this point in the history
  • Loading branch information
vnali authored Mar 28, 2024
1 parent fb0cc4d commit 5f06849
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/5.x/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ We plan to introduce a console command to handle merging similar fields. There i
])
.all() %}
{% for article in article %}
{% for article in articles %}
{% set image = article.featureImage|first %}
{% if image %}
{{ image.getImg() }}
Expand All @@ -256,7 +256,7 @@ We plan to introduce a console command to handle merging similar fields. There i
.section('blog')
.all() %}
{% for article in article %}
{% for article in articles %}
{% set image = article.featureImage.eagerly().one() %}
{# Testing whether there was a result is still a good idea: #}
Expand All @@ -278,7 +278,7 @@ This feature does have _some_ limitations, though. While it will work for all el
])
.all() %}
{% for article in article %}
{% for article in articles %}
{# Lazily-eager-loaded relation: #}
{% set image = article.featureImage.eagerly().one() %}
Expand Down

0 comments on commit 5f06849

Please sign in to comment.