Articles Laravel
TAG ARCHIVE

Everything on Laravel.

129 articles tagged Laravel, sorted newest first.

Filament

Upgrade to Filament v5: A Step-by-Step Migration Guide from v4

Filament v5's only real change is Livewire 4 support - so the upgrade is mostly running one script. Here's the full path, plus the Livewire 4 edits and plugin checks that actually need your attention.

12 min read
laravel

Give Laravel AI SDK Agents External Tools with MCP Servers

Stop hand-writing a tool for every capability. Register an MCP client, authenticate it, and spread its tools straight into your Laravel AI SDK agent.

8 min read
laravel

Refactor Messy Conditionals with Laravel's Pipeline Facade

That forty-line filter() method full of nested ifs? Laravel's Pipeline facade turns it into small, swappable, individually testable stages — with a worked query-filter example.

7 min read
laravel

Run Laravel AI SDK Agents in the Background with Queued Jobs

A synchronous AI call can tie up a PHP worker for half a minute. Here's how to run Laravel AI SDK agents on a queue and surface the result when it's done.

7 min read
filament

Add Status Tabs with Counts to a Filament v5 List Page

Filament tables can be filtered, but the filter form hides behind a button. For a fixed set of states like order status, tabs put always-visible, counted query scopes right above the table.

8 min read
laravel

Auto-Delete Stale Records with Laravel's Prunable Trait

Some tables only ever grow. Here's how Laravel's Prunable trait deletes stale rows on a schedule — safely, in chunks, with a hook for cleaning up related files.

6 min read
livewire

Build a Real-Time Chat App with Livewire 4 and Reverb

Most chat tutorials stop at 'message appears' and lean on Pusher. This is the end-to-end, first-party build: Reverb, DB-first persistence, private and presence channels, typing indicators, channel auth, and deployment — with no hand-written message JS.

18 min read
filament

Build a Global Settings Page in Filament v4 with spatie/laravel-settings

Most apps need editable global settings without a code deploy. Here's the clean Filament v4 path: a typed spatie settings class, a scaffolded page, an auto-bound form, and locked-down access.

7 min read
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
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
filament

Build Custom Table Filters in Filament v4

Past SelectFilter and TernaryFilter: build a custom Filament v4 filter from a form schema and a query() callback, add a date range, and wire up indicators.

8 min read
Laravel AI SDK

Track Token Usage and Cost with the Laravel AI SDK

Every Laravel AI SDK response carries a usage object. Here's how to capture it, attribute it to a user and feature, and turn tokens into a real cost dashboard.

8 min read
duster

Duster: Run Pint, PHPStan, and Rector with One Command

A mature Laravel app ends up with four code-quality tools, four configs, and four CI steps. Here's how Duster collapses them into one command — and when that's actually worth it.

7 min read
peck

Catch Spelling Mistakes in Your Laravel Codebase with Peck

Typos harden into method names, routes, and API fields you can't rename without a breaking change. Here's how I wire Peck into a Laravel project to catch them before they ship.

7 min read
devops

Run the Laravel Scheduler in a Docker Container the Right Way

The classic crontab line assumes a host cron that containers don't ship. Here are the two clean ways to run schedule:run in a container — supercronic and a Kubernetes CronJob.

7 min read
laravel

Zero-Downtime Database Migrations in Laravel: The Expand and Contract Pattern

Renaming a column in production is a classic self-inflicted outage. Here is the expand and contract playbook that ships breaking schema changes in Laravel with zero downtime and an instant rollback path.

14 min read
laravel

Automated Laravel Database Backups to S3 with spatie/laravel-backup

Wire up off-site, encrypted, self-pruning Laravel database backups to S3 with spatie/laravel-backup — scheduling, retention, and failure alerts included.

8 min read
laravel

Laravel Context: Request Data That Follows Your Logs and Jobs

Stop threading a request ID through every log call. Laravel Context sets it once in middleware and follows the request into every queued job it dispatches.

6 min read
laravel

Laravel AI SDK Tool Calling: Let the Model Run Your PHP

Give a Laravel AI agent real abilities: typed PHP tools the model can call to look up data, with enum-constrained inputs and a hard cap on runaway loops.

7 min read
tailwind

Tailwind v4 @reference: Fix @apply in Blade & Scoped CSS

Tailwind v4 resolves @apply against the theme in the current file, so a second CSS bundle throws 'unknown utility class'. Here's how @reference fixes it without duplicating output.

7 min read
filament

Filament v4 Infolists: Build Read-Only Record Views

Filament's default View page renders a greyed-out, disabled form. Here's how to replace it with a proper read-only infolist — entries, formatting, layout, and reuse in a table modal.

7 min read
livewire

Livewire 4 Slots: Pass Content Into Components Like Blade

Livewire 4 finally brings Blade-style default and named slots to full components. Here's how to use them to build reusable modal, card, and panel shells.

7 min read
pest

Measure Test Quality, Not Just Coverage: Pest Mutation Testing

100% line coverage can still ship bugs. Here's how Pest's mutation testing finds the assertions your test suite is quietly missing.

7 min read
filament

Build a Stats Overview Widget with Trend Sparklines in Filament v4

The Filament docs show a stat card with a hardcoded value and a fake sparkline. Here's the same widget wired to real period-over-period queries, delta-driven colours, and live polling.

6 min read
livewire

Fix Child Components That Won't Update with Livewire 4 #[Reactive] Props

Livewire props aren't reactive by default, so a parent can change a value and the child never notices. Here's the one-attribute fix, and when events are the better call.

6 min read
laravel

Test AI Features Without Calling the API: Agent::fake() in the Laravel AI SDK

You shipped an agent and wrote zero tests for it, because hitting a real model is slow, costs tokens, and needs a key in CI. The Laravel AI SDK's fake() fixes all three.

8 min read
laravel

The Complete Guide to Caching in Laravel: Tags, Locks, and Invalidation

Most Laravel developers know Cache::remember and stop there. This guide goes the whole way: drivers, stale-while-revalidate, cache tags, atomic locks for stampedes, and an invalidation strategy that survives production.

18 min read
livewire

Build a Multi-Step Wizard Form in Livewire 4 with Per-Step Validation

Reach for a package and you inherit its opinions. A multi-step wizard is just one Livewire component with a step counter and validation scoped to the step you're on.

10 min read
tailwind

Safelist Dynamic Blade Classes in Tailwind v4 with @source inline()

A Blade class like bg-{{ $color }}-500 works locally then disappears in production. Here's the Tailwind v4 fix with @source inline().

6 min read
laravel

Centralized Laravel Logging with Grafana Loki and Alloy

Stop SSHing into boxes to grep laravel.log. Aggregate structured logs from every Laravel instance into Grafana Loki, then query and alert on them.

9 min read
laravel-ai-sdk

Analyze Images with the Laravel AI SDK: Vision and Multimodal Prompts

The Laravel AI SDK does more than generate text. Here's how to attach an image to a prompt and have a vision model describe, classify, or extract data from it.

7 min read
laravel

Tail Laravel Logs in Real Time with Pail (Filters, Levels, and Users)

Stop scrolling storage/logs/laravel.log. Pail gives you a filtered, driver-agnostic live log stream right in your terminal.

6 min read
laravel

The Complete Guide to Production Observability in Laravel: Pulse, Nightwatch, and OpenTelemetry

Most Laravel teams ship to production with nothing but log files. This guide wires up the three pillars of observability — metrics, traces, and logs — with Pulse, Nightwatch, and OpenTelemetry, then builds an alerting strategy around the golden signals.

17 min read
laravel

Catch N+1 Queries Early with Eloquent Strict Mode

Turn N+1 queries into loud exceptions in development instead of silent latency in production. Here's what Eloquent strict mode does and exactly where to switch it on.

6 min read
laravel

Provider Fallback and Failover with the Laravel AI SDK

A single LLM provider is a single point of failure. Here's how to fail over to a backup provider with the Laravel AI SDK without rewriting a line of prompt code.

7 min read
laravel

Live Form Validation in Laravel with Precognition (Alpine + Blade)

Validate forms as the user types using your real backend rules — no rule duplication, no full submit. Here's the full Precognition + Alpine wiring.

8 min read
php

PHP 8.4 Lazy Objects: Defer Expensive Initialization in Laravel

You inject a heavy service into a controller, the container builds it on every request, and half your routes never touch it. PHP 8.4 lazy objects let you defer that cost until the object is actually used.

7 min read
tailwind

Tailwind v4 @utility — Define Custom Utilities in CSS, Not JavaScript

Your v3 addUtilities plugin is dead. Here's how the Tailwind v4 @utility directive replaces it — static, functional, and value-typed utilities, all in resources/css/app.css.

8 min read
pest

GitHub Actions + Pest Sharding — Cut Laravel CI from 12 Minutes to 3

Split your Pest suite across four GitHub Actions matrix jobs, balance them by real execution time, and gate merges on a single status check.

8 min read
laravel

Laravel Octane RoadRunner in Production — Tuning max_jobs, Worker Memory, and Supervisor

The four knobs that decide whether Octane on RoadRunner is a 5x performance win or a 3am pager: worker recycling, memory caps, worker count, and a Supervisor config that survives deploys.

7 min read
laravel

Laravel Job Middleware — Rate-Limit and Back Off Queued Jobs at the Job Level

Stop sprinkling RateLimiter::attempt() inside your job classes. Laravel job middleware wraps handle() with rate limits, back-off, and circuit breakers — here's the full pattern.

8 min read
laravel

Laravel 13 PreventRequestForgery: Origin-Aware CSRF Protection in 5 Minutes

Laravel 13 renames VerifyCsrfToken to PreventRequestForgery and adds a Sec-Fetch-Site origin check on top of the token. Here's what changed, how to configure it, and the upgrade traps.

7 min read
laravel

Laravel Reverb in Production — Horizontal Scaling, Presence Channels, and Load Balancing

Single-node Reverb is a fine starting point, but a real cluster needs Redis pub/sub, sticky sessions, supervised processes, the right health check, and connection monitoring. Here is the full playbook.

19 min read
laravel

Laravel AI SDK Structured Output — JSON Schema Enforcement for LLM Responses

Stop parsing markdown fences and stripping prose out of LLM replies. The Laravel AI SDK ships a HasStructuredOutput contract that forces the model to return JSON matching the schema you describe in PHP — and the same agent works across every supported provider.

9 min read
pest

PestStan — Type-Safe Pest 4 Tests With PHPStan Generics in a Laravel App

PestStan teaches PHPStan about Pest's globals — generic expect() types, proper $this binding, and rules that catch broken assertions before the test even runs.

9 min read
livewire

Livewire 4 #[Computed(persist: true)] — Cache Heavy Queries Across Requests

Livewire 4's #[Computed(persist: true)] flag turns a memoised method into a Laravel-cached value that survives every hydration cycle. Here's the gotchas.

7 min read
filament

Filament v4 Global Search: Custom HTML Result Titles and Inline Actions

Most Filament panels ship with the default plain-text global search and stop there. Here's how to render badges, attach Quick Edit actions, and scope results per tenant: all from four methods on the resource.

7 min read
filament

Filament v4 Nested Resources: Editing Child Models in Parent Context Without RelationManagers

How to scaffold a Filament v4 nested resource that edits child models inside the parent's URL: with scoped queries, pre-filled foreign keys, and policies that hide forbidden actions.

10 min read
laravel

Laravel Scout + Typesense: A Production Guide to Typo-Tolerant, Faceted, and Vector Search

Devs reach for the Scout database driver, watch a LIKE query crawl on 200k rows, and realise they need a real engine. Here's the full Typesense path: async indexing, facets, hybrid vector search, and a Pest test suite.

16 min read
pest

Pest 4 Snapshot Testing for Laravel API Responses: Catch Accidental Schema Drift

Pest 4 has snapshot testing built in. One expectation locks down the shape of your JSON responses so renamed keys and disappearing fields stop slipping into production unnoticed.

8 min read
ai

Stream Prism AI Responses Token-by-Token into Livewire with wire:stream

A ChatGPT-style chat UI in Laravel without writing a line of JavaScript, without WebSockets, without a separate Node process. Prism streams the tokens, Livewire's wire:stream paints them, you write the bubble.

11 min read
filament

Filament v4 Import and Export Actions: Built-in Bulk CSV Without a Plugin

A walkthrough of Filament v4's first-party ImportAction and ExportAction: Importer columns, the queued batch, failed-rows CSV, and the dialect tweaks Excel needs.

13 min read
livewire

Flux UI Table in Livewire 4: The Complete Guide to Server-Driven Pagination, Sorting, and Filtering

A 90-minute walkthrough that turns flux:table into a real data table: sortable headers, debounced search, multi-select filters, bulk-delete, inline-edit cells, URL state, named paginators, and a Pest 4 test suite that proves the lot.

21 min read
livewire

Livewire 4 Direct-to-S3 Temporary File Uploads: Stop Funnelling Bytes Through PHP

Default Livewire uploads route a 500MB MP4 through your PHP process. Here's the four-line config flip that sends bytes straight to S3: plus the CORS rule that always trips you up.

12 min read
livewire

Livewire 4 Form Objects with #[Validate]: Stop Bloating Your Components

A twelve-property component with its own $rules array, messages() method and resetForm() helper isn't a component anymore: it's a controller. Form Objects fix that.

11 min read
livewire

Livewire 4 wire:navigate: Get an SPA Feel Without Building a SPA

One attribute on your anchor tags turns a server-rendered Laravel app into something that feels like Next.js. Here's the prefetch tuning, @persist, and lifecycle hooks most tutorials miss.

10 min read
livewire

Livewire 4 and Alpine.js: Share State with $wire and @entangle (Without Killing Your Server)

Two state systems in one component. Here's when to keep state in Alpine, when to entangle, and the wire:model.live trap that quietly fires ten requests a second.

10 min read
livewire

Drag-and-Drop Reordering with Livewire 4 wire:sort

Livewire 4 ships drag-and-drop sorting natively. Here's the exact directive set, the handler signature, and a Kanban variant: minus the dead livewire/sortable package.

9 min read
laravel

Trace Every LLM Call: Langfuse Observability for Prism in Laravel

Prism gives you the LLM API; Langfuse gives you the receipts. Wire them together with one env var and trace every prompt, token, and tool call in twenty minutes.

8 min read
tailwind

Upgrade a Laravel App from Tailwind v3 to v4 with the Official Upgrade Tool

Tailwind v4 is a rewrite: Rust engine, no tailwind.config.js, renamed gradient and shadow scales. Here is the exact upgrade path I took on a production Laravel app, with the gotchas the upgrade tool will not catch for you.

10 min read
tailwind

Tailwind CSS v4 Dark Mode in Laravel: CSS-First with @custom-variant

Tailwind v4 killed tailwind.config.js. This walkthrough wires class-based dark mode end-to-end: @custom-variant in app.css, @theme tokens, an Alpine toggle, and a tiny inline script that kills the white flash on first paint.

11 min read
filament

Custom Filament v4 Actions with Confirmation Modals and Notifications

A walkthrough of building a Filament v4 Action that opens a confirmation modal, collects form input, runs the side-effect, and fires the right notification: without dropping into raw Livewire.

10 min read
filament

Filament v4 Many-to-Many Relation Managers: Pivot Fields, Attach, and Detach

How to surface pivot data in a Filament v4 relation manager: withPivot, AttachAction with form fields, scoped record selects, and a safe detach story.

10 min read
filament

Build a Custom Form Field in Filament v4: From make:filament-form-field to Production

A working walkthrough of building a custom Filament v4 form field: from the new artisan generator through Alpine state, validation, reactive callbacks, and a Pest test.

10 min read
stripe

Stripe Identity Verification in Laravel: KYC Without a Compliance Vendor

Stripe Identity is right there in the dashboard you already use, costs $1.50 per US check, and rides on the same session + webhook pattern as Checkout.

11 min read
laravel

Laravel Octane + FrankenPHP: Production Deployment Without Surprises

FrankenPHP turns Octane from a benchmark trick into a production runtime. Here's the actual checklist for shipping it behind Nginx without a 3am incident.

9 min read
laravel

Laravel 13 Reverb Database Driver: WebSockets Without Redis

The Reverb database scaling driver lets you run real-time WebSockets on a single Laravel box without standing up Redis. Here's the production setup.

8 min read
laravel

Laravel Queue Chains vs Batches: When to Pick Which

Bus::chain and Bus::batch solve different queue problems. Here's the decision framework and the combinations I reach for in production.

10 min read
laravel

Production AI Agents in Laravel: Reliable Loops with Prism and Laravel Workflow

A production-grade playbook for Laravel AI agents: verifier loops, idempotent tools, durable workflow state, Langfuse tracing, and evaluating agent quality in CI.

18 min read
pest

Pest 4 Browser Testing with Playwright: A Dusk Replacement That Actually Sticks

Pest 4 ships a first-party browser plugin powered by Playwright. Auto-waits, parallel runs, and time-balanced shards turn a 12-minute Dusk suite into a 90-second CI job.

9 min read
stripe

Stripe Flexible Billing Mode in Laravel Cashier: What Changed and How to Migrate

Stripe quietly made flexible billing mode the default for new subscriptions. Here's what flexible unlocks, where Cashier breaks today, and the migration path.

8 min read
laravel

Laravel 13 whereVectorSimilarTo(): Native Semantic Search in the Query Builder

Laravel 13's whereVectorSimilarTo() turns the query builder into a vector store. Plain strings in, ranked results out: no manual embedding pipeline.

9 min read
php

PHP Custom Attributes in Practice: Beyond Laravel's Built-ins

Laravel 13 ships dozens of built-in PHP attributes, but the docs are quiet on building your own. Here are the patterns I use in production for validation, auth, and auto-discovery.

10 min read
rector

Rector PHP: Automate Laravel Upgrade Refactors

Stop hand-editing hundreds of files when bumping PHP or Laravel versions. Here's how to wire Rector into a Laravel project, run it safely, and write a custom rule for the patterns specific to your codebase.

8 min read
laravel

The Complete Guide to Laravel 13 Multi-Tenancy with Teams

Laravel 13 brings team-based multi-tenancy back into the official starter kits with URL-based context that fixes the old session-based problems. This guide walks through the full lifecycle: scaffolding teams, scoping every query, handling invitations, isolating queued jobs, and choosing between shared-database and database-per-tenant: with copy-paste-runnable code at every step.

18 min read
stripe

Multi-Currency Checkout with Stripe and Laravel Cashier

Going international means charging in your customer's currency without re-architecting Cashier. Here's the production setup I use: per-currency prices, locale detection, and webhook handling that doesn't lie about amounts.

9 min read
laravel

Laravel Health Checks for Kubernetes Readiness and Liveness Probes

Laravel's /up route only proves the framework booted. Here's how to build readiness and liveness endpoints Kubernetes can actually trust: covering the database, Redis, queue, and disk.

8 min read
livewire

Livewire 4 Islands: Lazy-Load Expensive Components

Livewire 4 islands let you isolate expensive sections so they load independently without blocking the rest of your page. Here's how to use them.

7 min read
laravel

Laravel Pennant Feature Flags in Practice

Laravel Pennant gives you first-party feature flags without an external service. Here's how to use it for gradual rollouts, middleware gates, and reliable testing.

7 min read
laravel

Handling Stripe Disputes and Chargebacks in Laravel

Chargebacks happen to every SaaS eventually. Here's how to listen for Stripe dispute webhooks, auto-collect evidence, and submit it programmatically before the response window closes.

8 min read
laravel

Stripe Connect Express Onboarding in Laravel

Build marketplace-style payments in Laravel using Stripe Connect Express: onboard sellers via Stripe's hosted flow, then route funds and take your platform fee.

6 min read
laravel

Laravel Telescope vs Debugbar vs Pulse: Which Monitoring Tool When

Laravel ships three monitoring tools and most teams install all three without knowing which does what. Here's when to reach for each one.

7 min read
stripe

Stripe Pricing Tables with Laravel: Embed Checkout Without Custom UI

Stripe's Pricing Table handles your plan cards, billing period toggle, and promo codes: no custom UI needed. Here's how to embed it in Laravel and wire up customer tracking.

7 min read
devops

GitHub Actions Matrix Testing for Laravel: PHP × Database Combos

Stop testing against one PHP version and one database. Here's the copy-paste GitHub Actions matrix workflow that covers PHP 8.2–8.4 against MySQL, PostgreSQL, and SQLite in one go.

6 min read
laravel

Building a RAG Pipeline with Laravel AI SDK and pgvector

Build a complete retrieval-augmented generation pipeline in Laravel: from embedding documents and storing vectors in pgvector to generating grounded answers with the AI SDK.

9 min read
laravel

Laravel Boost MCP: Let AI Agents Understand Your Codebase

AI coding assistants stumble on Laravel's magic methods and facades. Boost is a local MCP server that gives them structured context so they stop guessing.

6 min read
laravel

PHPStan Level 10 in Laravel: Fix the 5 Most Common Errors

Bumped Larastan to level 10 and got 300 new errors? Here are the five patterns you'll see again and again: and the exact fix for each.

6 min read
laravel

The Complete Guide to Laravel 13 JSON:API Resources

Laravel 13 ships first-party JSON:API resources that handle spec-compliant serialization, relationships, sparse fieldsets, and compound documents out of the box. This guide walks through building a complete API using the new JsonApiResource class: from first resource to production-hardened endpoints.

21 min read
laravel

Laravel MCP Server: Expose Your App to AI Clients in 15 Minutes

The laravel/mcp package turns your Laravel app into an MCP server with a few artisan commands: no Node, no Python, just familiar middleware and routing.

6 min read
laravel

Laravel 13 PHP Attributes: Cleaner Models, Jobs, and Commands

Laravel 13 ships opt-in PHP attribute syntax across 36+ framework locations. Here's what changed for models, jobs, and Artisan commands: with zero migration required.

6 min read
laravel

Ditching Passwords: Setting Up Passkeys in Laravel 13

Passkeys are phishing-resistant, require no remembered secrets, and the browser handles the crypto. Here's how to add them to a Laravel 13 app in under an hour.

8 min read
laravel

Handling Stripe Subscription Lifecycle Events in Laravel: Beyond Webhook Verification

Signature verification is step one. Here's what to do with the six Stripe subscription lifecycle events that actually matter: what Cashier handles for you and how to write the rest.

7 min read
laravel

Dockerising Your Laravel App for Kubernetes: From Dockerfile to Running Pod

Take a Laravel app from Docker Compose to a running Kubernetes pod: covering the production Dockerfile, Nginx+PHP-FPM setup, and the K8s manifests you actually need.

8 min read
laravel

Laravel Prism Tool Calling: Build AI Agents That Actually Do Things

Prism's tool calling turns a text-generating LLM into an agent that can actually *do* things: query your database, hit an external API, or dispatch a queued job.

7 min read
laravel

Clean Up Your Jobs Config With Laravel 13's Queue::route()

Laravel 13 adds Queue::route(): a single place in your service provider to declare which queue and connection every job class uses. Here's how it works.

6 min read
laravel

Upgrading From Laravel 12 to Laravel 13: The Practical Guide

The Laravel 13 upgrade is mostly painless: but three config areas will silently change how your app behaves if you skip them. Here's what actually changed and what's worth adopting.

7 min read
laravel

The Complete Guide to the Laravel AI SDK in Laravel 13

Laravel 13 ships a first-party AI SDK that replaces the patchwork of vendor SDKs and community packages. Here's how to use every capability: agents, streaming, structured output, tools, embeddings and RAG: in one working project.

17 min read
laravel

Getting Started With Laravel Prism: Add AI to Any Laravel App in Minutes

Prism gives you a provider-agnostic fluent interface for OpenAI, Anthropic, Ollama, and more inside any Laravel app. Here's how to go from zero to your first AI response.

4 min read
laravel

Real-Time Notifications with Laravel Reverb and Echo

Reverb is Laravel's free, first-party WebSocket server. Here's how to go from zero to live browser notifications: private channels, Echo, and an Alpine.js toast: without touching Pusher.

8 min read
laravel

Laravel Vapor vs Laravel Forge in 2026: Which Deployment Platform Should You Choose?

Both are first-party Laravel deployment tools. They solve completely different problems. Here's the decision framework I use.

6 min read
laravel

Stop Laravel Queue Workers from Leaking Memory with --max-jobs and --max-time

Laravel queue workers are long-running daemons: and daemons drift. Here's how to configure them to self-restart before they start misbehaving.

5 min read
devops

Building an Automated Bug-Fixing Pipeline with Claude Cowork

A Claude Cowork scheduled task that reads Sentry errors, triages them via Linear, implements fixes in your Laravel codebase, and opens a GitHub PR: without you lifting a finger until review.

8 min read
stripe

Stripe Checkout sessions in Laravel: without Cashier

Laravel Cashier is excellent for subscriptions, but one-time payments don't need that overhead. Here's how to wire up Stripe Checkout directly with the PHP SDK.

6 min read
docker

Optimising Laravel Docker images with multi-stage builds

A single-stage Dockerfile for Laravel ends up with 800 MB+ images full of build tools you don't need in production. Multi-stage builds fix that: here's how.

7 min read
laravel

Fine-grained rate limiting on Laravel API routes

Slapping throttle:60,1 on every route treats your free-tier users and enterprise customers identically. Here's how to do it properly with named rate limiters.

5 min read
php

Replacing String Constants with PHP Backed Enums in Laravel Models

String constants like STATUS_PENDING are typo-prone, unautocompleted, and impossible to enumerate exhaustively. PHP backed enums fix all of that: and Laravel has native support throughout.

5 min read
php

PHP Readonly Classes as Value Objects in Laravel

Primitive obsession is one of those code smells that's easy to ignore: until you're debugging which integer is pounds and which is pence. PHP readonly classes fix that cleanly.

6 min read
laravel

Processing large CSV files with Laravel's lazy collections

Loading a 100k-row CSV with `collect()` will blow your memory limit. Laravel's `LazyCollection` gives you the full Collection API backed by PHP generators: here's how to use it.

5 min read
stripe

Adding a Stripe Customer Portal to your Laravel app with Cashier

Cashier's `redirectToBillingPortal()` gives your users a full subscription management UI: plan changes, cancellations, invoice downloads: in a single redirect. Here's how to wire it up.

4 min read
laravel

Building custom Laravel Pulse recorders to track your own metrics

Pulse ships with solid built-in recorders. Here's how to extend it with your own: tracking the domain events that actually matter in your app.

5 min read
laravel

Scaling Laravel queues in production: Horizon, Redis, and multi-server workers

Queue tutorials stop at dispatch and queue:work. Here is everything else: the architecture, Horizon configuration, failure handling, and multi-server scaling that keeps production queues healthy under real traffic.

16 min read
laravel

Monitoring Laravel queues in production with Horizon

Most teams install Horizon and leave it at its defaults. Here's the production configuration that actually gives you visibility into your queues.

6 min read
laravel

Upgrading from Livewire 3 to Livewire 4: A Practical Migration Guide

Livewire 4 shipped in early 2026 with SFCs, smarter wire:model, and a leaner Volt story. Here's how to upgrade a real app without surprises.

8 min read
stripe

Usage-based billing with Stripe Meters and Laravel Cashier

Stripe Meters replace the old metered subscription records. Here's how to wire them up with Laravel Cashier to charge customers per API call, token, or any countable unit.

6 min read
pest

Enforcing Laravel architecture rules with Pest's arch() helper

Pest's arch() helper lets you write rules that enforce your app's structure at test time: no more accidentally importing Eloquent into a controller.

5 min read
laravel

Verifying Stripe webhook signatures in Laravel without Cashier

You don't need Laravel Cashier to verify Stripe webhook signatures. Here's the minimal setup using the Stripe PHP SDK directly in a controller.

5 min read
laravel

Zero-Downtime Laravel Deployments with GitHub Actions and Forge

Stop manually triggering Forge deploys. Here's how to wire GitHub Actions to Forge's deploy webhook so every push to main ships automatically: without downtime.

6 min read
laravel

Fire HTTP requests after your response with Laravel 12's batch defer

Laravel 12.32 adds defer() to Http::batch(): a clean way to fire outbound HTTP calls after your response is sent, no queue worker required.

5 min read
laravel

The Complete Laravel Developer Toolchain for 2026

Stop spending days configuring tools. Here is every tool in my Laravel stack for 2026, why I chose each one, and exactly how to set it up.

18 min read
laravel

Running Laravel Pint Automatically with Git Pre-Commit Hooks

CI failing because someone forgot to run Pint again. Here's how to wire up a Git pre-commit hook so it never slips through.

4 min read
php

PHP 8.4 Property Hooks in Laravel Models

PHP 8.4 property hooks are a tidy language-level alternative to getters and setters: but before you reach for them in your Eloquent models, there's a catch worth understanding.

4 min read
stripe

Implementing Stripe trials for memberships: patterns and best practices

How to add trials to membership subscriptions using Stripe and Laravel Cashier, with patterns for free-until, trial_months, and safe webhook handling.

5 min read
Laravel

Stop Wasting Monitoring Quota: Block Malicious 404s with NGINX

Malicious bots were burning through my Laravel Nightwatch quota by hitting fake routes like /wp-login.php and /.env. Inspired by Michael Dyrynda’s approach using Cloudflare WAF, I built a portable NGINX blocklist that stops these 404s before they reach Laravel: no proxy required.

5 min read
Laravel

Streamlining Laravel Developer Onboarding with a Makefile and Herd Pro

Speed up Laravel onboarding with a powerful Makefile. Automate Herd Pro setup, install dependencies, and seed databases for a consistent, one-command setup experience.

4 min read
Laravel

A Developer’s Personal Site in 2025: What I Actually Use

Rebuilding my personal site from scratch using Laravel 12, Sushi, Folio, and Spatie packages: no CMS, no clutter, just a clean, fast dev blog.

3 min read
Laravel

Blazing-Fast Blogs with Laravel, Markdown, and Sushi

Why I chose Markdown and Sushi to power my Laravel blog: a simple, fast, and elegant alternative to heavier CMS setups.

4 min read