All Posts

Backticks in Git Commit Messages

Recently I wanted to have backticks in my git commit message. It didn’t work as expected though.

Better Diff Highlighting in Git

I prefer to use Git from the command line, but sometimes a GUI tool does a better job with specific tasks. One of those is diff highlighting, but today I found a way to make diffing with the Git CLI a lot nicer. Let’s look at an example.

How Apps Break Without Any Code Changes

Many times you can trace a bug back to a particular code change that was made. Or maybe it was caused by a package upgrade. But have you ever had something break when no code changed at all? How does that happen?

AWS Error Retrieving Credentials

Recently I upgraded phpdotenv on an older project and my AWS connection stopped working. Why did one package upgrade break the other? And how did I fix it? Read on for details.

Solving the Mockery Error: Could not load mock, class already exists

This is a really specific error you might never run into, but when you do, this blog post is here for you.

Why Are Eloquent Timestamps Nullable?

Recently I was creating a new table and using the timestamps helper in the migration. I noticed something that seemed wrong, so I dug a little deeper and learned something new about Laravel and MySQL.

Removing Disqus From the Site

Many years ago, when I moved my blog from WordPress to Hugo, I was very pleased to find Disqus as a way to still have comments on a statically generated site. Today, however, I have completely removed Disqus from this site.

Covering Value Ranges in Your Tests

For me, one of the main reasons I write tests is to have confidence that my code is working as expected and to catch myself if (or should I say when?) I break something in the future. I often think of testing the happy path and the failure path, but I’ll share some additional things I like to test in between that further boost my test confidence.

Access the Model Inside a Form Request

Laravel’s form requests really help reduce the amount of code in your controllers, especially around validation. Another convenience method they offer is authorization. I recently came across a small tip which isn’t explicitly stated in the docs and thought I’d share it.

Toggling Groups of Related Fields in Update Request

Let’s say you have a form with two groups of related, but mutually exclusive, fields. When you POST and store a new record, no problem, only the right fields are sent in. But what do you do when that record is updated? How can you cleanly handle this?