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.
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 publishes a super resourceful and practical newsletter. A must for anyone in the Laravel space"
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.
My colleague Brent and I are currently preparing a premium course on event sourcing in Laravel. In this stream, we explained the foundations, shared some thoughs on some of the concept, and answered questions from the audience.