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.
A REPL (Read-Eval-Print-Loop) is useful in a lot of cases. It allows you to run your code in this specific environment in a way that can be particularly useful with debugging.
So, what if you need a REPL in PHP but you don’t have Laravel Tinker available (yet?).
Laravel gives a lot of syntactical sugar helpers. This allows you to write your Laravel code in a few different flavors or dialects. Some programmers prefer using fluent interfaces, others composition, and others pure functional statements.
As a seasoned and salty programmer, I tend to stick with what I know. It can be easy to overlook the helpers that Laravel provides. But, with Eloquent, the when function is way more useful than a simple helper. The true eloquence comes from its handling of the results of the first condition check.
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.
In part 1, I introduced the problem of periodically retrieving a JSON data end point and appending it to a file. This small, quick task can easily
be solved by the demonstrated Laravel code. It’s simple, concise and readable. But is it the best solution?
“If you only have a hammer, everything is viewed as a nail” is an idiom referred to as Maslow’s hammer. It basically means that if you only know one tool, and you over-rely on it,
you’ll only use that tool to solve every problem, regardless of whether it’s the right one for the job. (It’s a common saying around these parts… that and Joel’s famous saying
“Do you even have a 5th bathroom if the floor isn’t heated?”)
Laravel is quite the Swiss Army Knife - it has easy solutions for just about every problem and task you have. That’s why I’m such a fan of it. But is it always the right tool for the job?