Laravel Site Search v3 is here: crawl and search your entire site using just your database original

by Freek Van der Herten – 5 minute read

We're proud to release v3 of laravel-site-search, a package that crawls and indexes your entire site. Think of it as your own private Google. Point it at a URL, let it crawl every page, and get full-text search results back.

Previous versions required Meilisearch as the search engine. That works well, but it means running a separate service.

With v3, your application's own database is all you need. It supports SQLite, MySQL, PostgreSQL, and MariaDB out of the box, and it's the new default.

Let me walk you through it.

Read more

How to easily access private properties and methods in PHP original

by Freek Van der Herten – 7 minute read

Sometimes you need to access a private property or method on an object that isn't yours. Maybe you're writing a test and need to assert some internal state. Maybe you're building a package that needs to reach into another object's internals. Whatever the reason, PHP's visibility rules are standing in your way.

Our spatie/invade package provides a tiny invade function that lets you read, write, and call private members on any object.

You probably shouldn't reach for this package often. It's most useful in tests or when you're building a package that needs to integrate deeply with objects you don't control.

Let me walk you through how it works.

Read more

Join 9,500+ smart developers

Get my monthly newsletter with what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.

No spam. Unsubscribe anytime. You can also follow me on X.

Oh Dear is now mobile-friendly

ohdear.app

Every page in Oh Dear now works on mobile. Not just slapped-on media queries, but reworked layouts: a floating action button for navigation, dedicated mobile card views for monitor lists, scrollable tables with fade hints, and bigger touch targets throughout. Over 160 Blade templates were touched.

Read more [ohdear.app]

My Claude Code setup original

by Freek Van der Herten – 4 minute read

I've been using Claude Code as my daily driver for coding tasks. Over time, I've built up a pretty specific configuration that makes the whole experience better. I keep everything in my dotfiles repo under config/claude/, so it's easy to sync across machines. In this post I'll walk through my setup.…

Read more

Generate OG images for your Laravel app original

by Freek Van der Herten – 5 minute read

When you share a link on Twitter, Facebook, or LinkedIn, the platform shows a preview image. Getting those Open Graph images right usually means either using an external service or setting up a separate rendering pipeline. We just released laravel-og-image, a package that lets you define your OG image as HTML right inside your Blade views. The package takes a screenshot of that HTML and serves it as the OG image. No external API needed, everything runs on your own server.

Let me walk you through what the package can do.

Read more

Building a PHP CLI for humans and AI agents with almost no hand-written code original

by Freek Van der Herten – 6 minute read

We recently released the Flare CLI, a command-line tool to manage your errors and performance data. It also ships with an agent skill that lets AI coding agents use Flare on your behalf.

The CLI has dozens of commands and hundreds of options, yet we only wrote four commands by hand. Our laravel-openapi-cli package made this possible: point it at an OpenAPI spec, and it generates fully typed artisan commands for every endpoint automatically.

Here's how we put it all together.

Read more

Let your AI coding agent fix your errors and review performance original

by Freek Van der Herten – 4 minute read

The Flare CLI lets you manage errors and performance monitoring from the terminal. It was built with almost no hand-written code, generated from our OpenAPI spec. Having a CLI is useful on its own, but where it gets really interesting is when you let an AI coding agent use it.

The Flare CLI ships with an agent skill that teaches AI agents like Claude Code, Cursor, and Codex how to interact with Flare on your behalf. Let me show you how it works.

Read more

Introducing the Flare CLI original

by Freek Van der Herten – 4 minute read

At Flare, we track errors and monitor performance for your applications. Until now, that meant opening the Flare dashboard in your browser whenever you wanted to check on things.

We just released the Flare CLI, a command-line tool that lets you manage your errors, projects, and performance monitoring data directly from the terminal. It also ships with an agent skill that lets AI coding agents like Claude Code and Cursor use Flare on your behalf. And the fun part: the entire CLI was built with almost no hand-written code, generated from our OpenAPI spec.

Let me walk you through how to install and use the CLI.

Read more

Adding a custom status line to Claude Code original

by Freek Van der Herten – 2 minute read

Claude Code has a nice little feature called the status line that lets you add a custom bar at the bottom of the terminal. I use it to show the current repo name and how much of the context window I've used. To set this up, first create a script at ~/.claude/statusline.sh: #!/bin/bash # Read JSON…

Read more