hungthai1401 / laravel-domain-oriented
Build a domain-oriented application on Laravel Framework
Installs: 1 662
Dependents: 1
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^7.2|^7.3|^7.4|^8.0|^8.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.6
- illuminate/console: ^7.0|^8.0|^9.0
- illuminate/filesystem: ^7.0|^8.0|^9.0
- illuminate/support: ^7.0|^8.0|^9.0
README
This package builds a structure to domain-oriented application (not DDD).
Requirements
- PHP 7.2+, 8.0, 8.1
- Laravel 7.x, 8.x, 9.x
Introduction
I want to build structures in an organized and productive way. Take a look at the final structure:
src ├── App │ ├── Admin │ │ ├── Controllers │ │ ├── Middlewares │ │ ├── Requests │ │ └── ... │ ├── Api │ │ ├── Controllers │ │ ├── Middlewares │ │ ├── Requests │ │ └── ... │ └── Console │ ├── Commands │ └── ... ├── Domain │ ├── Dummy │ │ ├── Actions │ │ ├── QueryBuilders │ │ ├── Collections │ │ ├── DataTransferObjects │ │ ├── Events │ │ ├── Exceptions │ │ ├── Listeners │ │ ├── Models │ │ ├── Rules │ │ └── States │ └── ... ├── Support │ ├── Providers │ ├── Middlewares │ ├── Controllers │ └── ... database ├── factories ├── migrations └── seeders ...
Setup
- Run this Composer command to install the latest version
composer require hungthai1401/laravel-domain-oriented --dev
- If you prefer, you can export the config files:
php artisan vendor:publish --provider="HT\LaravelDomainOriented\ServiceProvider" --tag="config"
- Run this command to build the domain structure:
php artisan domain:make Dummy
- And of course, if you want to remove the structure, just run this command:
php artisan domain:remove Dummy