ARTICLES

Everything I've written.

livewire

Protect Livewire 4 Properties from Client-Side Tampering with #[Locked]

Every public Livewire property is sent to the browser and accepted back, so a user can rewrite it in DevTools. #[Locked] shuts that door for the properties that matter.

6 min read
laravel

Persist Multi-Turn Chat History with the Laravel AI SDK

A stateless agent forgets every turn. Here's how to wire persistent conversation memory into a Laravel AI SDK agent, resume a chat by ID, and stop long histories from wrecking your token budget.

7 min read
php

Parse HTML5 Properly with PHP 8.4's Dom\HTMLDocument

For twenty years, parsing HTML in PHP meant fighting DOMDocument's mangled UTF-8 and XPath. PHP 8.4's Dom\HTMLDocument finally does it properly.

6 min read
tailwind

Style Form Fields After Interaction with Tailwind v4's user-valid and user-invalid

A `required` field shouldn't glow red before anyone has typed. Tailwind v4's `user-invalid:` variant styles validation state only after interaction — no JavaScript, no class toggling.

6 min read
pest

Measure and Enforce Type Coverage with Pest's Type Coverage Plugin

'We use types' is not a measurable claim. Pest's type coverage plugin turns it into a percentage you can read per file and enforce in CI.

5 min read
github-actions

Cache Composer and NPM in GitHub Actions to Speed Up Laravel CI

Cache Composer's download directory and the npm cache in GitHub Actions, keyed on your lockfiles, so composer install and the asset build finish in seconds.

7 min read
laravel

Run Independent Work in Parallel with Laravel's Concurrency Facade

Turn six sequential dashboard queries into one parallel batch. A practical look at Laravel's Concurrency facade — run(), defer(), the three drivers, and when a queue is still the right call.

7 min read
laravel

Deploy Laravel to a VPS with Kamal 2: A Complete Guide

Kubernetes is overkill and click-ops doesn't scale. Kamal 2 deploys a containerised Laravel app to a plain VPS over SSH, with zero-downtime cutover and automatic SSL from a single config file.

16 min read