Implementing Domain Driven Design and Hexagonal Architecture example API using Laravel.
- Docker
- Makefile
- PHP 8.0
- Laravel
- Clone this project:
git clone [email protected]:valgutu-templates/laravel-hexagonal-architecture-ddd.git
- Create
.env
file from.env.example
- Set up DB credentials in
Makefile
and.env
- Change the ApplicationName in composer.json autoload psr-4
- Rename app in
.env
,Makefile
,default.conf
,Dockerfile
- Install all the dependencies and bring up the project with Docker executing:
make up
- Generate key
make php-artisan cmd="key:generate"
- The server should be running on
localhost:8080
src
src
is for "Source". Here we put all our code base being as independent as possible of any implementation (except is there is in infrastructure
subfolder).
make create-migration name="ExampleMigrationName"
Create migrations
make php-artisan cmd="key:generate"
Run migrations
make migrate-up
Rollback migrations
migrate-down