Validating the sum of a property in an array in Laravel
Needing several values in an array to add up to a particular total led me to a reusable Laravel validation rule, with configurable properties, target sums and failure handling.
29 Nov 2022
3 min read
Writing an addon for Statamic (aka learning to love the AddonServiceProvider)
Building Statamic addons becomes easier once their service provider makes sense, so I share the setup decisions, workflow and registration helpers I’ve found useful in my own packages.
25 May 2022
22 min read
Using a trait for adding toasts (notifications) to a Laravel/Inertia app
Sharing toast notifications between controllers, middleware and an Inertia frontend led me to a small trait that keeps the session logic consistent and easy to reuse.
31 Mar 2022
5 min read
Adding watermarks to images in Statamic 3
Rebuilding my photography website gave me a reason to automate image watermarks, keeping their sizing and placement consistent without preparing every upload by hand.
4 Nov 2021
16 min read
Using Alpine.js in a Netlify form
A form that worked locally disappeared from Netlify’s detection after deployment, and tracking down the cause revealed an awkward interaction with Alpine’s submit attributes.
28 Oct 2021
5 min read
Conditionally including partials in Statamic 3 using the new 'exists' and 'if_exists' tags
A missing optional partial shouldn’t bring down an entire page, so I contributed helpers that let Antlers templates check for files or quietly continue when an include isn’t available.
5 Oct 2021
6 min read
Statamic 3's 'please' spec for Fig
Seeing how Fig builds its command suggestions inspired me to contribute a Statamic spec, bringing autocomplete for commands, arguments and options to the terminal’s ever-so-polite please command.
1 Oct 2021
3 min read
Singular and plural modifiers in Statamic 3
Getting result labels to read naturally is a small detail, but Statamic’s singular and plural modifiers offer a useful starting point for those finishing touches.
19 Sep 2021
3 min read
Filtering entries by Taxonomy in Statamic 3 using AND or OR logic
A client needed several taxonomy filters with different matching rules, so I built a Statamic tag that combines AND and OR conditions while keeping control over its underlying query.
4 Sep 2021
7 min read
@inertiajs/inertia 0.10.0 and Laravel Jetstream: update the Head and Link component usage
Updating an older Jetstream project to Inertia 0.10 broke some familiar components, and tracing the error revealed changes to how Head and Link needed to be registered or imported.
23 Jul 2021
3 min read