All Posts

The Benefits of Minimal Factories in Laravel

Laravel factories are a huge time-saver when writing tests. In the past, I’d build a factory to include every model property in the default state, but lately I’ve switched to having minimal factories by default. I’ll explain my reasons for this change, and what benefits I’ve found.

Choosing a Status Code for an Expired Record

In a previous post, I discussed some thoughts around choosing the right HTTP status code. In today’s post, I’ll tackle a different scenario, and my reasoning behind the particular status code I ended up using.

Using Logs to Debug a Laravel API

On a recent project, we were building a Laravel API to be consumed by a mobile app being built by a separate team. When an end user reported an issue, one of the first questions was “Is this bug in the API or the mobile app?” In this post, I’ll share a logging strategy we used to help us quickly get to the root cause of the problem.

How to Not Trim Strings Dynamically

Laravel automatically trims incoming strings in the HTTP request. This convenience can be easy to take for granted because it’s such a sensible default behavior, but how would you disable it for just one route? And why might you want to do that?

Multi-word Route Parameters in Laravel

We all make stupid mistakes from time to time. I’m sharing this one to hopefully save someone else a little frustration.

Case Sensitive Volumes on macOS

I used to think Docker would solve all my issues with local dev matching the production environment, but I was wrong.

Why I Switched My Podcast to Transistor

Podcast hosting is one of those things that feels very difficult to change. I worked hard to build an audience and I didn’t want a behind-the-scenes technical change to break any subscriptions and alienate listeners. As a result, I kept putting off the move to Transistor. Well, I finally took the plunge, and I’m happy to report it was much easier than I anticipated. Before we get into the details, I want to step back and explain my motivation to move in the first place.

Validating File Upload Arrays in Laravel

Let’s say you have an HTML form with 3 file inputs named certificate[], and you want to make them all required. Should be pretty easy, right?

Digging Deeper Into Laravel Password Validation

Recently, a powerful new validation rule was added to Laravel to enforce password strength and security. There have been several great articles on how to use it, but this article will dive deeper and shed some light on how it works internally.

Will My Laravel App Break on March 23?

Maybe you’ve received a notice from Amazon that certificates are changing on your S3 bucket on March 23, 2021. Several people have asked me: Will my Laravel app break on March 23?