- Copy
.env
file from.env.example
, and modifyDB_HOST
andDB_PASSWORD
according to your envirnoment. - Follow the steps below.
composer install
php artisan migrate
php artisan db:seed
- ドメイン層にレポジトリのインターフェイスを設置し、インフラストラクチャー層から依存するように実装しています。
src/
└── Demo
├── Application
│ └── UseCase
│ └── UserUseCase.php
├── Domain
│ ├── Exception
│ │ └── InvalidDomainException.php
│ ├── Model
│ │ ├── DateOfBirth.php
│ │ ├── Email.php
│ │ ├── Gender.php
│ │ ├── Name.php
│ │ └── User.php
│ └── Repository
│ └── UserRepositoryInterface.php
├── Infrastructure
│ ├── Eloquent
│ │ └── UserEloquent.php
│ ├── InfrastructureProvider.php
│ ├── Repository
│ │ └── UserRepository.php
│ └── Translator
│ └── UserTranslator.php
└── Presentation
├── Controllers
│ ├── ApiController.php
│ └── UserController.php
└── Resources
└── UserResource.php