Ever handed off a feature request with barely any detail and expected the developer to just figure it out? In this week's podcast, Aaron and I make the case for writing requirements before development starts, and why letting AI write them for you is a trap. #php #laravel https://masteringlaravel.io/daily/2026-09-07-laravel-podcast-write-better-requirements-or-pay-for-it-later
Automated tests catch most bugs, but not all of them. Today's tip is a reminder of why I still click through the app before pushing my code. #php #laravel https://masteringlaravel.io/daily/2026-08-26-republished-manual-testing-still-has-its-place
Most factory states just flip a flag, but they can also accept arguments. That opens up some useful patterns, like deriving test data from another model. #php #laravel https://masteringlaravel.io/daily/2026-08-20-factory-states-can-accept-arguments
If your test only creates the row you're looking for, the query under test can be completely broken and the test still green. #php #laravel https://masteringlaravel.io/daily/2026-05-28-add-noise-records-to-your-tests-and-put-them-on-both-sides
I used to reach for docker compose up, start, stop, and down almost interchangeably, until a change I made quietly didn't take effect. Here is the mental model that cleared it up. #php #laravel https://masteringlaravel.io/daily/2026-06-11-docker-up-start-stop-and-down-are-not-interchangeable
I wasn't paying close enough attention, and Claude committed a scratch file I never wanted in the repo. Here is how I cleaned it out of history while still keeping the file on my machine. #php #laravel https://masteringlaravel.io/daily/2026-06-10-removing-a-file-your-coding-agent-shouldnt-have-committed
When I introduce PHPStan to a project, my goal isn't necessarily to get to the highest level as fast as possible. Here's the approach I generally take instead. #php #laravel https://masteringlaravel.io/daily/2026-06-09-republished-a-measured-approach-to-using-larastan
In today's video, I run a quick Tinker demo that reveals a surprising bcrypt behavior, and explain why Laravel ships a max length rule for passwords. #php #laravel https://masteringlaravel.io/daily/2026-05-29-video-why-does-laravel-offer-a-max-password-length-validation-rule
Your team says "Larastan" but composer.json says "phpstan". Composer has a key that lets both names run the same script. #php #laravel https://masteringlaravel.io/daily/2026-06-02-give-your-composer-script-a-second-name
We work hard to avoid magic strings everywhere in Laravel, so why am I perfectly happy with one inside a migration? #php #laravel https://masteringlaravel.io/daily/2026-06-05-isnt-that-just-a-magic-string
In today's video, I delete the docblock Laravel adds to every new factory just to see what breaks. My editor didn't care, but Larastan sure did. Let's see why. #php #laravel https://masteringlaravel.io/daily/2026-06-12-video-get-better-auto-complete-from-your-factories
We love the convenience and features of Eloquent, so why do I deliberately avoid it when a migration needs to manage important system-level data? #php #laravel https://masteringlaravel.io/daily/2026-06-04-why-reach-for-the-db-facade-in-a-migration
A good coding rule settles a debate once and then enforces itself. Here's why I lean on them, especially with a framework as flexible as Laravel. #php #laravel https://masteringlaravel.io/daily/2026-06-03-republished-how-clear-coding-rules-can-free-up-your-team
JSON language files use the string itself as the key, so where does the pluralization pipe go? Today's tip shows it works exactly like array files, once you get past how strange it looks. #php #laravel https://masteringlaravel.io/daily/2026-08-25-pluralization-works-in-json-language-files
Converting an Eloquent casts property to the newer casts method looks like a pure style choice for which syntax you prefer, but here's a real-world example where the two behave differently. #php #aravel https://masteringlaravel.io/daily/2026-08-31-when-new-syntax-is-not-actually-equivalent-functionality
Ever have a test that fails once out of 500 runs, then passes when you run it again? The test value you picked might be colliding with random Faker data. #php #laravel https://masteringlaravel.io/daily/2026-08-12-republished-picking-a-good-test-value
Dropping an index in a down migration usually means guessing at its name. Today's tip shows a cleaner way that lets Laravel figure it out for you. #php #laravel https://masteringlaravel.io/daily/2026-08-28-republished-a-better-way-to-drop-a-unique-index
Still keeping that commented-out code around just in case? In this week's podcast, Aaron and I explain why dead code hurts more than it helps, and why deleted code is never truly gone anyways. #php #laravel https://masteringlaravel.io/daily/2026-06-01-laravel-podcast-your-codebase-is-not-a-museum-for-old-code
A quirk I first wrote off as a dev-only annoyance turned out to share a root cause with a bug that real users could hit in production. #php #laravel https://masteringlaravel.io/daily/2026-06-08-when-a-dev-quirk-is-a-production-bug-in-disguise
In today's video, watch a listener with the wrong import silently stop working, with no errors anywhere, and see the one-line test that catches it instantly. #php #laravel https://masteringlaravel.io/daily/2026-08-14-video-make-sure-your-listeners-are-wired-up
In today's video, watch a paginated list quietly show some records twice while never showing others, and see the one-line fix that makes pagination deterministic. #php #laravel https://masteringlaravel.io/daily/2026-08-21-video-why-pagination-sometimes-has-overlapping-pages
When your app is behind a reverse proxy, it might seem like an easy fix to just force HTTPS to make your links render correctly, but it totally ignores other important behavior that remains broken, like rate limiting. #php #laravel https://masteringlaravel.io/daily/2026-08-17-the-downside-of-just-forcing-https-when-behind-a-reverse-proxy
Laravel serializes a model's loaded relationships when you queue a job, but not when you queue a collection of models. Here's the right way to load relationships inside the job. #php #laravel https://masteringlaravel.io/daily/2026-09-03-republished-loading-relationships-inside-a-queued-job
Composer insisted the class didn't exist, but it was sitting right there in the vendor folder. The problem was the package, but I'll explain how we fixed it with Composer and why we picked the approach we did. #php #laravel https://masteringlaravel.io/daily/2026-08-18-when-composer-cant-find-a-class-that-exists
Pennant defaults to the database driver, but not every feature flag needs a table row and a query. Today's tip shows when the array driver is the lighter choice. #php #laravel https://masteringlaravel.io/daily/2026-09-01-you-dont-always-need-to-put-pennant-in-the-database
Laravel redirects back to the previous page when validation fails, but what happens when there is no sensible previous page? Today's tip covers a redirect loop that shows up with bookmarks and new tabs, and a simple way to stop it. #php #laravel https://masteringlaravel.io/daily/2026-08-27-when-a-validation-failure-causes-a-redirect-loop
Ever been told your slow app just needs caching? In this week's podcast, Aaron and I break down the layers of caching in a Laravel app, from the Cloudflare edge down to in-request memoization. #php #laravel https://masteringlaravel.io/daily/2026-08-24-laravel-podcast-which-layer-of-caching-does-your-slow-app-actually-need
You don't need to obsess over your site analytics, but an occasional look can pay off. One glance at ours revealed a stranger already selling our book for us. #php #laravel https://masteringlaravel.io/daily/2026-08-19-republished-pay-attention-to-analytics
Sometimes multiple controller actions need the same guard logic, but it doesn't belong in a policy or form request. Here's a clean way to share redirect logic without messy hacks. #php #laravel https://masteringlaravel.io/daily/2026-09-02-republished-sharing-redirect-logic-between-controller-actions
You pass a model to Mockery's with() and the test fails, even though your code called the service with the right model. Here's a cleaner way to match it. #php #laravel https://masteringlaravel.io/daily/2026-08-13-when-mockery-says-your-eloquent-model-doesnt-match
If another site loads a script built by your Laravel app, switching to Vite can quietly break it. Here's the CORS gotcha we hit and how we fixed it. #php #laravel https://masteringlaravel.io/daily/2026-09-04-republished-something-to-know-if-serving-scripts-for-other-sites
