- Docker
- Makefile (optional)
Run the commands: make build-setup
├── .docker
│ ├── app
│ │ ├── docker-xdebug.ini
│ │ └── Dockerfile
│ └── nginx
│ ├── conf.d
│ │ └── app.conf
│ └── Dockerfile
├── .env
├── docker-compose.yml
└── Makefile
├── app
│ ├── Enums
│ ├── Http
│ │ └── Controllers
│ │ └── UserController
│ ├── Models
│ │ └── ExternalUserModel
│ ├── Providers
│ │ ├── RepositoriesServiceProvider
│ │ └── ServicesProvider
│ ├── Repositories
│ │ ├── ExternalUserRepository
│ │ │ ├── ExternalUserRepository
│ │ │ └── ExternalUserRepositoryInterface
│ │ └── Repository
│ └── Services
│ └── UserService
│ ├── UserService
│ └── UserServiceInterface
└── config
├── chunk
└── csv
Run the commands: make test
This demonstration has the following design patterns:
- Dependency Injection;
- Repository Pattern;
Regarding the storage that might change. If needed, we can create/change to different driver.
See below the steps:
- In the config/filesystems, add the new driver. (ie: s3, represents a S3 bucket)
- On UserService, in the storeFile method: change the disk name to the new one.
Included postman collection.