Exploring Sprintf in the Browser
sprintf is an amazing function that doesn’t get enough love. Because of this, I had put together a little tool to explore it in the browser.
sprintf is an amazing function that doesn’t get enough love. Because of this, I had put together a little tool to explore it in the browser.
In Laravel 11+, it’s quite easy to tell the exception handler to render all (or a select portion of them) as JSON regardless of the request/response type. But what about earlier versions?
Most things we want to validate in Laravel are simple. But, what should we do when we want to add more validation outside of the standard patterns that are provided? In this example, I’ll show how I do just that.
I’ve written about Custom PHP Exceptions before - as well as using PHP Interfaces for code readability. There’s one coding pattern that I use pretty consistently that encompasses these concepts - a custom exception for code or functionality that is not yet written.
In most of my applications, time is reflected in the UTC timezone. This is great for logic and math, but not so great when showing the date to the regular user.
Now, it’s pretty easy to show the UTC dates in the user’s timezone, without even asking them what it is.
Let’s see how to do this with a little bit of HTML and Javascript.
Recently, I had an issue with PHPStorm not detecting my Docker configuration. I was using Docker Compose and everything worked fine with docker cli and Orbstack. Why wouldn’t PHPStorm recognize this? It’s a simple fix, actually. It has to do with the name of your project. Let me explain.
Sometimes I need to spin up a quick Laravel instance on my Mac to test something out. With just a couple keystrokes, I can get a brand new Laravel instance running in a Docker container, ready for my IDE and testing. Here’s how.
What type of contractor are you hiring? That’s a question you should be asking yourself - and them - before you pull the trigger. Let me expand on the reason for this…
Thanks to the foexplorer website, we have the manuals for 2020-2024 Ford Explorers online. After working with my mechanic brother on mine, it became clear that we need printable versions of these for some people. So I created a system to make them printable.
I can never seem to find or remember how to disable each of the 1Password popup options. Hopefully this helps!