infinito/generate-ddd-structure-laravel

Generate basic folder structure in hexagonal/ddd architecture for Laravel

v0.0.1 2022-08-24 07:53 UTC

This package is auto-updated.

Last update: 2024-11-18 22:11:31 UTC


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();