PHP code example of filippo-toso / laravel-domain-library
1. Go to this page and download the library: Download filippo-toso/laravel-domain-library library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
filippo-toso / laravel-domain-library example snippets
php artisan domain:setup:structure
php artisan domain:make:domain Invoices
php artisan domain:make:application Admin\Invoices
php artisan vendor:publish --tag=stubs --provider="FilippoToso\Domain\Support\ServiceProvider"
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
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"