infinito / generate-ddd-structure-laravel
Generate basic folder structure in hexagonal/ddd architecture for Laravel
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/infinito/generate-ddd-structure-laravel
Requires
- php: >=8.0
README
Generate basic folder structure in hexagonal/ddd architecture for Laravel
composer require infinito/generate-ddd-structure-laravel
Folder structure
- Application
- Domain
|
- Exeptions
- Infrastucture
|
- Controllers
|
- Routes
|
- Services
Important: the "src" folder must be created in the project. Example: ProjectName/src
To implement class or method
class ClassName {
public function methodName($bounded='Bounded', $className='User'){
$generator = new \Infinito\GenerateDDDStructure\StructureGenerator();
$generator->create($bounded, $className);
}
}
Execute
Line command
php example/index.php Bounded User
or
(new ClassName())->methodName();