Have you ever heard of a “kill switch”—a device meant to disable machinery if its owner is incapacitated? Turns out you can also build kill switches into your code. Tony shares four kill switch examples for Laravel applications.
The LoB principle dictates that the behavior of a unit of code should be as obvious as possible by looking only at that unit of code. But I think something is missing from this discussion.
Get my monthly newsletter with what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.
No spam. Unsubscribe anytime.
You can also follow me on X.
"Freek’s newsletter is one of the best ways to stay updated with the Laravel and PHP ecosystem. It consistently highlights useful packages, tools, and ideas from the community, especially the amazing work coming from Spatie. As a Laravel developer building SaaS and web platforms, I find it extremely helpful to discover practical tools and insights that improve my development workflow."
We will crack the controversy of the repository pattern in Laravel. The good and the bad, and what alternatives we can use to build a maintainable codebase.
In a standard Laravel application, you can schedule Artisan commands in your console kernel. While that works for most projects, we took a different route in Mailcoach. Instead of scheduling commands, we're scheduling jobs.
Before we learn strategies for better software design, we must understand our enemy - complexity. Let’s define complexity, how to spot it, and what causes it.
Dave Calnan has been using Remix in production for about 6 months now and has decided to add a Laravel backend to the stack. Here's what he's learned from the process.
Laravel gives you the flexibility to choose the structure of controllers yourself, which is both a blessing and a curse. You won't find any recommendations in the official Laravel docs, so let's try to discuss various options, based on one specific example.
In a typical Laravel application we are very used to doing things in a certain way, by the book as they say. However there comes a point in the applications lifetime that it is going to be easier to start looking to split this code into Domains so that we can logically group our code.
The use of a message envelope has many benefits for the design of your application. It allows you to carry system information, nicely separated from domain information, in a generic way.
Event-driven systems come in all sorts of shapes and sizes. The obvious commonality is; they all use events to communicate information. These events come in many shapes and sizes, and determining what goes into an event has an immense impact on the design of your system.
If you ever wanted to get started with event sourcing, this is the course for you. It contains a beautifully designed ebook, two hours worth of videos, and a demo Laravel app containing an event-sourced shopping cart.
Event sourcing isn't an all or nothing approach. Even if your project doesn't need the full power of event sourcing, you can still benefit from knowing and implementing best practices from the event sourcing world.
In this stream my colleague Brent and I continued our conversation about the foundations of event sourcing. This time we showed a shopping cart that we've built using Laravel and event sourcing.