Skip to content
Back to Blog

Tagged: AI

Anthropic Prompt Caching in Laravel: A Practical Guide

Running Sevantia, our AI chat product, I watched the same 2,800-token system prompt get re-billed on every single user message. Multiply that by thousands of conversations a day and you're paying Anthropic to re-read the same instructions into Claude's context over and over. Prompt caching fixes this. It took me longer than it should have to get the mental model right, and the docs skip over the parts that trip up most people. This is the guide I wish I'd had when I first enabled it.

· 9 min read ·

Building a Production-Ready Laravel MCP Server

Every Laravel developer has seen the MCP hype by now. Laravel's tagline changed to "The clean stack for Artisans and agents." The laravel/mcp package landed, tutorials appeared overnight, and suddenly everyone's building weather tools. But those tutorials stop right where real questions start. How do you authenticate AI clients hitting your server? What happens when an agent sends garbage to a tool that writes to your database? Should you even use MCP, or is your REST API already enough? I've been digging into this for a project, and these are the decisions and patterns I wish someone had documented before I started.

· 9 min read ·

Which AI Package Should You Actually Use in Laravel?

Eighteen months ago, using Claude or GPT from a Laravel app meant writing raw HTTP calls or using whatever half-maintained wrapper you could find on Packagist. Today there are four solid options, all actively maintained, all with real download numbers behind them. I maintain one of them. anthropic-php and its Laravel companion anthropic-laravel have a combined 597,000 installs on Packagist. I've been building and shipping AI features in PHP since before most of these packages existed. So when people ask me "which one should I use?", I have opinions. They might surprise you. Here's the honest breakdown.

· 10 min read ·

Stay in the Loop

Get the latest posts delivered to your inbox - on your schedule.

No spam. Unsubscribe anytime.