Tutorials
Practical step-by-step guides on Laravel, Filament, and the PHP ecosystem.
The internet treats the Laravel AI SDK and Prism PHP as competitors and keeps repeating that the official SDK uses Prism under the hood. The composer.json says otherwise. In this post: what each package actually does, the code side by side, the table of what only exists in one of them, the release cadence of both, and a decision guide by concrete case. No "it depends".
The Laravel AI SDK is Laravel's first-party AI package: agents as PHP classes, tool calling, structured output, streaming, embeddings with pgvector and fakes for testing without burning tokens. A practical guide from composer require to your first running agent, covering what the SDK solves, what it doesn't, and the limitations nobody tells you about.
You send a one-line question and /usage reports a whole day's worth of consumption. Saving tokens in a coding assistant has nothing to do with prompt size: it's about prefix caching. How it works in Claude Code, Codex, and Cursor, the seven actions that invalidate it without you noticing, how to measure it with cache_read vs cache_creation, and eight levers to stretch the session.
We combed through the new official Codex documentation (learn.chatgpt.com) and boiled it down to the 10 best practices OpenAI itself recommends: outcome-first prompting, a living AGENTS.md, restrictive permissions, model selection, skills, cloud, and automation.
A step-by-step guide to running an LLM locally with Ollama: install it, run qwen3:8b in 2 commands, and plug it into your code through the OpenAI-compatible endpoint. It runs on 8 GB of RAM with no GPU required. As a bonus, the VRAM math by model size and when local beats the API.
An LLM code review prompt your team will actually read: five patterns (diff-anchored, severity gate, tool use before guessing, mandatory citation, and self-grading with a threshold) that raise the signal ratio from ~20% to above 60%. Comes with a complete REVIEW.md and a GitHub Actions workflow ready to plug into a Laravel project.
Vibe coding with an agent in Laravel works until the feature has business rules. Then the agent makes things up. Spec-Driven Development fixes that by turning the specification into the source of truth. In this post we walk through the PRD, spec, plan, tasks, code and tests cycle on a feature that looks silly: exporting a sales report as a PDF. PHP stack, Claude Code and Spec Kit, from scratch.