Moving from PHPStorm to Zed for Laravel development
– x.com
Chris Mellor wrote a practical guide on setting up Zed as a Laravel IDE, covering PHP extensions, Pint formatting, Blade support, and how it compares to PHPStorm.
Read more [x.com]
Posts tagged with php
– x.com
Chris Mellor wrote a practical guide on setting up Zed as a Laravel IDE, covering PHP extensions, Pint formatting, Blade support, and how it compares to PHPStorm.
Read more [x.com]
A thorough walkthrough of building a RAG system in Laravel using the new AI SDK, Postgres for vector storage, and Livewire 4 for a streaming chat UI. Covers everything from what RAG is and how semantic search works to embedding documents and querying them.
Read more [tighten.com]
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.
"I’ve been reading freeks newsletter for a while now, and it’s easily one of my favorite developer newsletters. Freek shares practical, no-nonsense insights from running Spatie, maintaining hundreds of open-source packages, and shipping real products. Every time I get useful Laravel tips, smart tooling advice, always high quality and immediately applicable."
Daniel Coulbourne walks through building an MCP server with the official laravel/mcp package. He built one for his blog in about 20 minutes, then used it to write and publish the post you're reading.
Read more [thunk.dev]
We just released v7 of spatie/laravel-query-builder, our package that makes it easy to build flexible API endpoints. If you're building an API with Laravel, you'll almost certainly need to let consumers filter results, sort them, include relationships and select specific fields. Writing that logic by hand for every endpoint gets repetitive fast, and it's easy to accidentally expose columns or relationships you didn't intend to.
Our query builder takes care of all of that. It reads query parameters from the URL, translates them into the right Eloquent queries, and makes sure only the things you've explicitly allowed can be queried.
// GET /users?filter[name]=John&include=posts&sort=-created_at $users = QueryBuilder::for(User::class) ->allowedFilters('name') ->allowedIncludes('posts') ->allowedSorts('created_at') ->get(); // select * from users where name = 'John' order by created_at desc
This major version requires PHP 8.3+ and Laravel 12 or higher, and brings a cleaner API along with some features we've been wanting to add for a while.
Let me walk you through how the package works and what's new.
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.
A handy overview of the Ray configuration options in Laravel. You can automatically send duplicate queries, slow queries, exceptions, and dump output straight to Ray without adding any ray() calls to your code.
Read more [myray.app]
Joel Clermont shares a simple trick to determine if a test is covering your application logic or just testing Laravel itself. If you can comment out a chunk of your code and the test still passes, it's probably not worth keeping.
Read more [masteringlaravel.io]
We just released v10 of laravel-backup, our package that creates backups of your Laravel app. The backup is a zip file containing all files in the directories you specify, along with a dump of your database. You can store it on any of the filesystems Laravel supports, and you can even back up to…
We just released v8 of Laravel Sitemap. This package that can generate sitemaps by crawling your entire site or by manually adding URLs. This version upgrades the underlying crawler to v9, adds a couple of nice new features, and cleans up the internals.
Let me walk you through what the package can do and what's new in v8.
Our spatie/crawler. package is one of the first one I created. It allows you to crawl a website with PHP. It is used extensively in Oh Dear and our laravel-sitemap package.
Throughout the years, the API had accumulated some rough edges. With v9, we cleaned all of that up and added a bunch of features we've wanted for a long time.
Let me walk you through all of it!
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.
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.

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.
Tempest 3.0 has been released with a new exception handler, PHP 8.5 as minimum requirement, improved CSRF protection using browser headers, database performance improvements, and closure-based validation rules.
Read more [tempestphp.com]
PHP 8.0 introduced attributes, and they're a great way to add structured metadata to classes, methods, properties, constants, and parameters. The concept is solid, but the reflection API you need to actually read them is surprisingly verbose. What should be a simple one-liner ends up being multiple lines of boilerplate every time. And if you want to find all usages of an attribute across an entire class, you're looking at deeply nested loops.
We just released spatie/php-attribute-reader, a package that gives you a clean, static API for all of that. Let me walk you through what it can do.
A comprehensive guide to making your Laravel app work well with AI agents. Covers llms.txt, markdown responses, structured data, and coding guidelines.
Read more [hafiz.dev]
The title is a tad hyperbolic, but this blogpost provides a nice overview of how the Laravel PDF package works under the hood.
Read more [jpcaparas.medium.com]
We just published a new package called Laravel OpenAPI CLI that turns any OpenAPI spec into dedicated Laravel artisan commands. Each endpoint gets its own command with typed options for path parameters, query parameters and request bodies.
Let me walk you through what the package can do.
Hafiz Riaz walks through building a document analyzer agent with the Laravel AI SDK. The tutorial covers structured output, streaming responses, and tool use, all in about 30 minutes.
Read more [hafiz.dev]
What if you could write your terminal prompt and shell commands with a language you're already familiar with?