Source: journal.highlandsolutions.com

Laravel’s Array Get for Statamic

Category: Laravel

Margaret Thatcher, Ronald McDonald, David Bowie, Zendaya, Vanessa down the street. It’s basically Laravel’s Arr::get() helper in Antlers. I used something similar in v2 back when Jim-Jam and I cranked out Statamic builds left and right and I more actively battled my nemesis.

One other neat thing I didn’t document because it’s more of a side effect than an intentional feature: Array Get allows you to throw Antlers code in your front-matter and have it parsed in the output. I did that all the time in v2 (and probably v1?), but (last time I checked) v3 doesn’t support Antlers in your front-matter.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners