Speeding Up Laravel Tests with tmpfs (MySQL in RAM)
If your Laravel test suite is painfully slow and does a lot of database work (multi-tenancy, migrations, seeding), the bottleneck is almost certainly disk I/O. Not CPU, not…
Read articleIf your Laravel test suite is painfully slow and does a lot of database work (multi-tenancy, migrations, seeding), the bottleneck is almost certainly disk I/O. Not CPU, not…
Read articleLaravel's $touches property automatically updates parent model timestamps when child models are modified. Basic Usage class Comment extends Model { protected $touches = ['post']; public function post() {…
Read articleRendering Chart.js charts into PDFs with wkhtmltopdf can be surprisingly tricky. wkhtmltopdf uses QtWebKit (an older browser engine), while Chart.js draws on an HTML5 canvas and often assumes…
Read articleIn Laravel, a Factory is a class dedicated to generating instances of your Eloquent models. They solve a fundamental problem: your application needs data to function, especially during…
Read articleIs your Docker-based development environment sluggish? Do your fans spin up for no reason? If you run docker stats, do you see your MySQL container writing gigabytes of…
Read articleLaravel's cache tags feature only works with Redis and Memcached. Using it with other cache drivers (file, database, DynamoDB, array) will throw exceptions. This creates problems when switching…
Read articleWhen working with Statamic's Bard fieldtype programmatically, you'll often need to convert its structured data to HTML. The documentation doesn't make this obvious, but here's how to do…
Read articleThis guide shows you how to test Statamic addons effectively. Testing addons is different from testing regular PHP packages because they depend on Statamic's core functionality, which often…
Read articleCreating custom UI components in Statamic addons with AJAX functionality is poorly documented, making it frustrating to implement. This guide shows you exactly how to build Vue components,…
Read articleThis guide walks you through creating a Statamic addon from scratch. We'll build a real addon that adds functionality to your Statamic installation. What You're Building By the…
Read articleWhen developing Laravel projects with Docker and Sail, it’s important that all commands use Sail to ensure the environment is consistent. However, the AI models and agents in…
Read articleWhen trying to add Laravel Sail to an existing project, you often encounter a classic catch-22 situation. You need to run php artisan sail:install to set up your…
Read article