Prompt Engineering
& LLM Guides
Practical guides on writing better prompts, cutting token costs and building with LLM APIs, for ChatGPT, Claude and Gemini users.
PHP2Shell: Critical PHP RCE Flaws and the Fix
PHP2Shell explained: two critical PHP flaws allow remote code execution. Fixed versions, developer steps and an owner checklist.
AI Prompt for Unit Tests on Legacy Code
The exact AI prompt for unit tests I use on untested legacy PHP functions, built around real guarantees instead of a vague write-tests request.
Fix Laravel 419 CSRF Token Mismatch Error
A real fix for the Laravel 419 CSRF token mismatch error — session cookie settings, SPA/Axios setup, and when to actually use the except array.
OpenAI Function Calling in a Laravel App
How to wire OpenAI function calling into a Laravel backend so an LLM can trigger real actions, plus the validation and loop-depth safeguards you actually need.
Fix WooCommerce Cart Fragments Slowing Your Site
WooCommerce cart fragments slow? Here is why the get_refreshed_fragments AJAX call bypasses your cache and the fix that keeps the mini-cart working.
Fixing OpenAI API Timeouts in Laravel Jobs
OpenAI API calls timing out inside your Laravel queue? Here's why jobs fail mid-request and how to set timeouts that actually agree with each other.
Debug Silent Laravel Queue Failures With AI
Laravel queue jobs can fail silently while Horizon still shows success. Learn why it happens and how AI helps trace the swallowed exception fast.
AI Prompt to Write Unit Tests for Legacy PHP
Learn how to write an AI prompt that generates real unit tests for legacy PHP code, including the hidden edge cases a generic prompt misses.
Fix PHP 'Allowed Memory Size Exhausted'
PHP Allowed memory size exhausted fatal error, explained: what triggers it, the quick php.ini fix, and the chunk()/cursor() code fix that stops it recurring.
Stay ahead of the curve
Get the latest prompt engineering strategies, token optimization tricks, and platform updates delivered straight to your inbox once a month. No spam.