ARTICLES

Everything I've written.

tailwind

Tailwind v4 pointer-* Variants: Sizing Touch Targets by Input Device, Not Screen Width

Using md: as a stand-in for touch breaks on touchscreen laptops and desktop-mode tablets. Tailwind's pointer-* variants read the actual input device — here is the compiled CSS for each one and the patterns worth adopting.

9 min read
livewire

Integrating Third-Party JavaScript with Livewire 4: The Complete Guide

Every third-party JavaScript bug in Livewire has the same root cause: the library mutated the DOM and morph doesn't know. Here's the full mental model, then the whole toolkit — wire:ignore, wire:replace, $wire, @persist and the morph hooks — each paired with the failure it fixes.

20 min read
tailwind

Tailwind v4 nth-* Variants: Striped Tables and Staggered Lists Without a Plugin

Styling every third card used to mean an arbitrary selector or a community plugin. Tailwind v4 ships nth-* as core variants — here is the compiled CSS for each form and the three ways people get them wrong.

8 min read
pest

Build Custom Pest Expectations for Your Laravel Domain Language

Turn the six-line assertion blocks you keep pasting between tests into named expectations like expect($order)->toBeFulfilled(), then ship them as a package.

10 min read
phpstan

Write a Custom PHPStan Rule to Enforce Your Laravel Conventions

Some conventions live only in reviewers' heads, so they rot. A PHPStan custom rule moves one of them into CI permanently — here is the whole build, including the test.

11 min read
php

PHP Randomizer Engines: Choosing Between Secure, Seeded and Fast Randomness in Laravel

Two problems with one root cause: tokens that are guessable, and tests that are flaky. PHP's Random extension fixes both, once you pick the right engine.

9 min read
php

The #[\Override] Attribute: Catching Broken Laravel Inheritance at Compile Time

PHP 8.3's #[\Override] attribute converts a whole class of silent inheritance bugs into loud compile-time errors. Here's where it pays off in a real Laravel app — and the four places it will blow up in your face.

7 min read
tailwind

Style State with Tailwind v4 data-* and aria-* Variants

Open, closed, loading, selected — each state ends up as another ternary in a `:class` string. Tailwind v4 lets you toggle one attribute and style it with a variant instead.

9 min read