New answers tagged

1 vote
Accepted

How to implement Laravel's collection `filter` method inside twig?

Use the filter filter. {% set filtered = items|filter(item => item > 2) %} https://craftcms.com/docs/3.x/dev/filters.html#filter
user avatar
  • 3,819

Top 50 recent answers are included