Dynamic Service Container Tagging for Runtime Logic Switching
Did you know that Laravel’s Service Container supports tagging for grouping multiple implementations of an interface or class?
All of my long-form thoughts on programming, leadership, product design, and more, collected in chronological order.
Did you know that Laravel’s Service Container supports tagging for grouping multiple implementations of an interface or class?
You’d think a senior developer, especially in Laravel and Livewire, wouldn’t need help, right? Like, aren’t they the gurus who glide through code without breaking a sweat? Turns out… even seniors need a hand sometimes. Here’s why every Laravel senior could use another senior in their life—and maybe a few good laughs along the way.
Let me tell you, this week has been a rollercoaster ride. 🎢
As a developer, life was simple. Write code, fix bugs, deploy. Rinse and repeat. But somewhere along the way, I leveled up—not in a video game sense (although I wish)—but to something called a “senior manager with developer responsibilities.”
The tests I write are usually written in Pest, PHPUnit, or Jest. I also usually commit them to a code repository - but not all automated tests should be committed. I wrote what I consider to be an automated test that was a "single-use test". It served its purpose and it will forever be in my heart, but not in my repository.
You probably think fast database queries are good. You also probably think slow database queries are bad. On top of all of these "thinks" you have about database queries - there is a certain Laravel method that, if you have seen it, you probably think you understand…but there is a chance you don’t.