Are You Tired Of Monster Controllers And Models?
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 Book
273 pages of high-quality content that teaches you how to do Domain-Driven Design with Laravel.
Tons Of Code Examples
You'll learn how to apply the concepts of domain-driven development through real-world and complex examples.
Real-World Application Code
Source code of MailTool which is a real-world e-mail marketing app that uses Domain-Driven Design.
Bonus Content
Testing complicated features and getting started with static analysis and CI/CD pipelines. A case study of a financial application.
introduction
About The Book
"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 DTOsRemoving annoying status strings like
draft
orapproved
with States and TransitionsStructuring 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
Table of Contents
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
Get A Free Chapter
Download the first 48 pages and take a look at it
What's inside
The Bonus Content
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
What Are People Saying
Dries Vints, a developer from the Laravel Core Team called it a "great new book:"
There's no such thing. Most objects can be placed wherever you like in the app directory.
— Dries Vints 👨🚀 (@driesvints) May 18, 2022
Also, there's this great new book by @mmartin_joo that they might be interested in: https://t.co/xnpfRApPvl
Some examples from the book got featured on the Laravel Daily channel.
Excelent book, this is what I was looking for
— Aldo Mendez (@aldomendez86) April 19, 2022
We lack learning resources on Laravel architectures for large-scale apps. Thanks a lot for filling that gap with “Domain-Driven Design with Laravel”. Recommend to everyone interested in making your app easier to maintain and scale.
— Salvis Blūzma (@SBluzma) July 29, 2023
This is a well articulated gem
— Knight Yoshi (@KnightYoshi) March 31, 2022
Nice reading... I enjoyed your writing style in your book. I could find some nice ideas that I can apply to my projects, even from the first pages. There is no bloat here! Good luck with releasing it 🚀
— Giannis Gasteratos (@igasteratos) April 7, 2022
I just read `Domain-Driven Design with Laravel` - Sample Chapter by @mmartin_joo, I am already in love with it! Can't wait to read the rest of the chapters. I will be eagerly waiting for the release, up until good luck @mmartin_joo
— Moshiour Rahman (@m0shiur) March 15, 2022
One of the best book. I ever read. 👍👍👍
— Somenet (@shankhadevpadam) April 19, 2023
One of the best investments that I could to do. Thanks @mmartin_joo https://t.co/RQ42sCPQLr
— Jerson Moreno (en casa 🏡) (@JersonMorenoR) April 19, 2022
I love how real life your work is...
— Joseph (@josephkeilan) March 25, 2022
Highly recommend signing up to @mmartin_joo news letter. Just read through quite a few pages of domain driven design such a good read so far cannot wait to purchase the book when it’s completed.
— DelaneyDev (@DevDelaney) March 21, 2022
Exactly the kind of tips that you'll use everytime once you've heard of it. Thanks for the share 😊
— JeepayJipex (@MarietJean) April 11, 2022
The fact that @mmartin_joo's laravel books comes with examples is what makes it fun to read because these are real life examples which you can try out on your own.
— Obinna Elvis O. (@obinnaelviso) July 10, 2023
We are start using Custom Query builder after reading Laravel DDD book by @mmartin_joo ❤️.
— Al Emran (@ALEMRANCU) August 10, 2023
Thank you so much @mmartin_joo for your amazing book.
I have learned many approach of those you mention on the book from @phpfour ( My beloved mentor) . pic.twitter.com/aLbC08bh7O
Spectacular
— AL - I Serve God For A Living 💙 (@VimKanzo) April 6, 2022
Based on what Martin regularly tweets and on his blog posts I can already foresee a brilliant work.
— Fernando (@arrobapampa) April 6, 2022
I can't wait to get it and put it in practice! https://t.co/nBvUM2wpg4
So educative and well structured ! Your book deserves to sell well bro
— chris (@codedwebltd) April 30, 2022
everything you need
Premium Package
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
Regular Price $199
Real-world project included
Plus Package
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 $79
only the essentials
Basic Package
The 273-page book in PDF format
Who Am I?
👋 Hey!I'm Martin Joo, a PHP developer since 2012. I'm also a content creator, blogger, and author of:
Microservices with Laravel
Laravel Concepts
Test-Driven APIs with Laravel and Pest
Laravel Eloquent Recipes
Proper API Design with Laravel
Common Mistakes in Laravel
As you can see, I really love Laravel. I'm also sharing everything I know about development on Twitter.
Frequently Asked Questions
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