Radical Design Course by Jack McDade

From the creator of Statamic

Learn how to make your websites standout and be remembered.

This course is the most refreshing take on teaching design that I've come across.

— Mikaël Sévigny, Developer

where-in Modifier

Filter an array (such as a Replicator field's data) to items where a key matches specific values.

games:
-
feeling: love
title: Dominion
-
feeling: happy
title: Netrunner
-
feeling: hate
title: Chutes and Ladders
<h2>I love...</h2>
{{ games | where_in('feeling', ['love', 'happy']) }}
{{ title }}<br>
{{ /games }}
<?php
$filteredGames = Statamic::modify($games)
->whereIn(['feeling', ['love', 'happy']])
->fetch();
?>
 
<h2>I love...</h2>
@foreach ($filteredGames as $game)
{{ $game['title'] }}
@endforeach
Dominion
Netrunner
Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →