Category: Laravel, Laravel

So, you read the Laravel Beyond CRUD series and thought this is the way. Start building a domain-driven application in Laravel from scratch is a real pain in the ass, I know from experience.

With LDL you can make the following classes: php artisan domain:make:model Invoice — domain=Invoices php artisan domain:make:states — model=Invoice — domain=Invoices — states=Paid,Pending,Overdue,Cancelled php artisan domain:make:subscriber — model=Invoice — domain=Invoices php artisan domain:make:events — model=Invoice — domain=Invoices — events=saving,created,deleting php artisan domain:make:subscriber — model=Invoice — domain=Invoices — events=saving,created,deleting php artisan domain:make:collection — model=Invoice — domain=Invoices php artisan domain:make:querybuilder — model=Invoice — domain=Invoices php artisan domain:make:dto Invoice — domain=Invoices — application=Admin\Invoices php artisan domain:make:query InvoiceIndex — domain=Invoices — application=Admin\Invoices — model=Invoice php artisan domain:make:viewmodel InvoiceForm — domain=Invoices — application=Admin\Invoices — model=Invoice php artisan domain:make:action InvoiceIndex — domain=Invoices — application=Admin\Invoices — model=Invoice php artisan domain:make:request Invoice — application=Admin\Invoices php artisan domain:make:exception InvalidInvoice — domain=Invoices This command will create all the classes above in a single sweep: php artisan domain:make:suite — domain=Invoices — application=Admin\Invoices — model=Invoice — states=Paid,Pending,Overdue,Cancelled — events=saving,created,deleting — dtos=Invoice,CreateInvoice — queries=InvoiceIndex — dtos=Invoice,CreateInvoice — exceptions=InvalidInvoice — queries=InvoiceIndex — requests=Invoice — viewmodels=InvoiceForm — actions=CreateInvoice,PayInvoice,CancelInvoice

Now you don’t have any excuse to star building domain driven applications in Laravel!
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners