With this guide, you can get rid of them forever. You're one click away from advancing two years in your career!
โ 4.7 average rating. Read by 1116+ happy developers.

273 pages of high-quality content that teaches you how to do Domain-Driven Design with Laravel.
You'll learn how to apply the concepts of domain-driven development through real-world and complex examples.
Source code of MailTool which is a real-world e-mail marketing app that uses Domain-Driven Design.
Testing complicated features and getting started with static analysis and CI/CD pipelines. A case study of a financial application.
introduction
"Domain-Driven Design with Laravel" is the complete guide to mastering DDD the Laravel way. The book covers topics like:
Simplifying ugly controllers with the help of Actions
Leaning out your models with Custom Query Builders
Using View Models to query data for a specific page
Writing very high-level code with Custom Collections
Getting rid of random arrays like $data using Value Objects and DTOs
Removing annoying status strings like draft or approved with States and Transitions
Structuring your code using Domains and Applications
Applying CQRS in the most simple yet effective form
โฆAnd much more
All of the above by building a complex, real-world application. No โhello worldโ or โsmells like a Youtube tutorialโ examples. We will implement an e-mail marketing application such as ConvertKit or MailChimp, to be more precise.
What's inside
In the book, I teach you how to do domain-driven design by building a real-world e-mail marketing application. Something like Mailchimp or Convertkit that ships with complex features such as e-mail sequences, automation, using queues to send hundreds of e-mails, or creating reports about the e-mails and their performances.
Basic concepts
60 pages
The first section of the book focuses on the basics. It shows you what domain-driven design is and its main concepts.
What is Domain-Driven Design?
Working With Data
Value Objects
Data Transfer Objects
Repositories
Services
Actions
ViewModels
CQRS
States And Transitions
Domains And Applications
Boundaries
Advantages And Disadvantages
Design
24 pages
The second section shows you how to design a reasonably complex e-mail marketing application. From the database to the domains.
Overview
User Stories
Data Modeling
Subscribers
Broadcasts
A Quick Note On Performance
Sequences
Automations
Domains
Build
188 pages
This is where we start coding! We will implement many exciting, and complicated features using the concepts discussed earlier.
Setting Up Domains and Applications
Subscribers
Creating A New Subscriber
Updating A Subscriber
View Models
Vue Component
Get Subscribers
The real power of DTOs and Actions
Conclusion
Broadcasts
The Broadcast DTO
Handling Filters
Upserting A Broadcast
Filtering Subscribers
Sending A Broadcast
Calculating The Performance Of A Broadcast
Previewing A Broadcast
Get Broadcasts
Sequences
Creating A Sequence
Proceeding A Sequence
Refactoring
Updating The Subscriber's Status
Calculating The Performance Of A Sequence
Progress Of A Sequence
Dashboard And Reports
New subscriber counts
All-Time Performance
Subscribers
Automations
Upserting automations
Running automations
Download the first 48 pages and take a look at it
What's inside
Case Study
Designing a portfolio and dividend tracker application.
Data Modeling
Custom Eloquent Collections
Integrating 3rd party APIs
Calculating Yield-On-Costs and Weighted Averages With The Help of Custom Collections
Testing Complex Features
How to efficiently test complicated real-life features.
Importing From CSV
Running Automations (events, queues)
Proceeding E-mail Sequences (mails, queues, time-sensitive scheduling logic)
Static Analysis & CI/CD Pipelines
Take your PHP code to the next level.
phpinsights
phpstan
deptrac
Github Actions
Gitlab Pipelines
Feedback
Dries Vints, a developer from the Laravel Core Team called it a "great new book:"
Some examples from the book got featured on the Laravel Daily channel.

MailTool source code included, which is a production Laravel e-mail marketing application.
Testing complex features. A 30-page PDF that shows you how to test real complicated features that interact with files, queues, e-mails, or time-sensitive.
Static analysis and CI/CD pipelines. A 18-page PDF helps you get started with phpinsights, phpstan, deptrac, Github actions, Gitlab pipelines. Example files included.
A 20-page case study of designing and building a portfolio and dividend tracker app. Source code included.
Teaches you how to use custom Eloquent Collections. A topic not covered in the book.
The 273-page book in PDF format

A 20-page case study of designing and building a portfolio and dividend tracker app. Source code included.
Teaches you how to use custom Eloquent Collections. A topic not covered in the book.
The 273-page book in PDF format
Regular Price $69

The 273-page book in PDF format

๐ Hey!I'm Martin Joo, a PHP developer since 2012. I'm also a content creator, blogger, and author of:
Building a database engine
Performance with Laravel
DevOps with Laravel
Microservices with Laravel
Laravel Concepts
As you can see, I really love Laravel. I'm also sharing everything I know about development on Twitter.
Do you offer a money-back guarantee?
Yes, for 30 days! Just reach out to me at martin@martinjoo.dev, and you'll get your money back. I'll only ask you why didn't you like the product.
Exactly what files are included?
This can be different based on what package you purchase.Basic: one PDF file that contains the 273-page book.Plus: two PDFs and a ZIP file. One PDF for the book, another one for the case study. The ZIP file contains the source code of the portfolio and dividend tracker application.Premium: four PDFs and two ZIP files. One PDF for the book, one for the case study, one for "Testing Complex Features," and another for "Static Analysis And CI/CD." One of the ZIP files contains the source code of the portfolio and dividend tracker application. The other one has the source code of MailTool.
Can I upgrade from one package to another later?
Yes! Just drop me an e-mail at martin@martinjoo.dev, and I'll create you a discount code, so you only have to pay the difference between the two packages.
Is there an epub or mobi format?
Right now, every content ships in PDF format. The reason is simple: each PDF contains a ton of code examples. These code examples look very nice in a PDF where I can use HTML to format the pages.epub and mobi kind of mess this up, so this is why I exported everything in PDF.However, if you cannot live without these formats, drop me an e-mail, and I can export a copy for you.
Looking for a team license?
Check out the details here.
Published: 2022.04.19
Updated: 2023.03.25