Download the PHP package alibori/laravel-ddd-domain-resources without Composer
On this page you can find all versions of the php package alibori/laravel-ddd-domain-resources. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alibori/laravel-ddd-domain-resources
More information about alibori/laravel-ddd-domain-resources
Files in alibori/laravel-ddd-domain-resources
Package laravel-ddd-domain-resources
Short Description Package to generate domain resources for a Laravel DDD application.
License MIT
Homepage https://github.com/alibori/laravel-ddd-domain-resources
Informations about the package laravel-ddd-domain-resources
Laravel DDD Domain Resources
Package to generate domain resources for a Laravel DDD application.
Compatible with Laravel 9.x and 10.x.
Keeping in mind that DDD architecture in a Laravel application has a lot of different approaches, this package is intended to be used as a vertical slice of a DDD implementation. Also, it has some basic stub files that can be customized to fit your needs.
Installation
You can install the package via composer:
You can publish the config file with:
This is the contents of the published config file:
Optionally, you can publish the stubs using
Usage
Generate a domain directory structure
Once the package's config file is published and filled, you can generate a domain directory structure with the following command:
This will generate the following directory structure:
Generate a domain resource
In base of the previous directory structure, you can generate a domain resource file with the following command:
Where {file-type}
can be one of the following:
use_case
contract
event
exception
value_object
repository
controller
For example, to generate a UseCase
file, you can run the following command:
When you run this command, you will be prompted to enter the name of the resource. For example, if you want to generate a CreateUser
use case, you can enter CreateUser
as the resource name.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.