Skip to content

Blog

Writing

Engineering, AI experiments, and software craft.

Posts tagged "Laravel"

Essays, field notes, and engineering write-ups by Al Amin Ahamed covering Laravel — practical patterns, gotchas from production code, and lessons learned shipping real systems. Topics include architecture decisions, performance tuning, debugging stories, and integration notes you can apply directly to your own Laravel work.

Filtered by Laravel ✕ clear
MCP Servers for Laravel: A Production Pattern
May 12, 2026
· 0 min read

MCP Servers for Laravel: A Production Pattern

How I built the MCP server that powers AI access to this portfolio — JSON-RPC over Streamable HTTP, Sanctum bearer auth, an ability-scoped tool registry, and the gotchas worth knowing before you ship.

RAG on SQLite: Pure-PHP Cosine Similarity Without pgvector
Apr 25, 2026
· 9 min read

RAG on SQLite: Pure-PHP Cosine Similarity Without pgvector

How I built RAG retrieval against a SQLite database using pure-PHP cosine similarity — when it scales, when it doesn't, and the migration path to pgvector.

A Multi-Provider AI Driver Pattern for Laravel
Mar 10, 2026
· 10 min read

A Multi-Provider AI Driver Pattern for Laravel

A clean driver pattern for switching between Claude, OpenAI, Groq, and Ollama in a Laravel app — with failover, testing, and a single calling interface.

Cutting Claude API Costs by 89% with Prompt Caching
Feb 5, 2026
· 8 min read

Cutting Claude API Costs by 89% with Prompt Caching

A practical Laravel integration of Anthropic prompt caching — what to cache, the 1024-token minimum, multi-breakpoint strategies, and real cost numbers.

Splitting Laravel into Three Vite Bundles for Smaller Pages
Jul 5, 2025
· 7 min read

Splitting Laravel into Three Vite Bundles for Smaller Pages

How I split this portfolio into three independent Vite bundles (frontend, auth, dashboard) — separate dependencies, separate CSS, working HMR across all three.

Caddy + Laravel: A 50-Line Production Config
Jun 18, 2025
· 8 min read

Caddy + Laravel: A 50-Line Production Config

The exact Caddyfile I run in production — automatic HTTPS, HTTP/3, security headers, rate limiting, asset caching, all in ~50 lines.

Supervisor for Laravel: Queue Workers, Scheduler, Horizon
May 22, 2025
· 8 min read

Supervisor for Laravel: Queue Workers, Scheduler, Horizon

Production Supervisor configs for Laravel queue workers, schedule:work, and Horizon — with the gotchas around stopwaitsecs, max-time, and zero-downtime restarts.

Cloudflare in Front of Laravel: Real IPs, Trusted Proxies, Locked-Down Origins
Apr 30, 2025
· 8 min read

Cloudflare in Front of Laravel: Real IPs, Trusted Proxies, Locked-Down Origins

How to make Laravel see real visitor IPs through Cloudflare — TrustProxies config, origin firewall rules, geolocation headers, and the caching gotchas.

Building a RAG Pipeline in Laravel with pgvector
Apr 15, 2025
· 8 min read

Building a RAG Pipeline in Laravel with pgvector

How I built the AI chat on this site: chunking documents, generating embeddings with Voyage AI, storing them in pgvector, and answering questions with Claude.

Laravel Queues at Scale: Lessons from 10 Million Jobs
Mar 20, 2025
· 10 min read

Laravel Queues at Scale: Lessons from 10 Million Jobs

Patterns and pitfalls I've learned running Laravel queues in production — from connection pooling and job chunking to dead-letter handling and zero-downtime deployments.

Hunting N+1 Queries in Laravel: Tools, Strict Mode, and Fixes
Jan 30, 2025
· 8 min read

Hunting N+1 Queries in Laravel: Tools, Strict Mode, and Fixes

How to find N+1 queries with Telescope, Debugbar, and preventLazyLoading() — and the eager-loading patterns that fix them, including the polymorphic gotcha.

10 Eloquent Query Optimizations, in Order of Effectiveness
Jan 12, 2025
· 9 min read

10 Eloquent Query Optimizations, in Order of Effectiveness

A systematic optimization checklist for Eloquent — select(), chunk(), chunkById(), withCount(), pluck(), subquery selects, and when to bypass the model layer entirely.