hungthai1401/laravel-domain-oriented

Build a domain-oriented application on Laravel Framework
3,904 5
Install
composer require hungthai1401/laravel-domain-oriented
Latest Version:v0.0.1
PHP:^7.2|^7.3|^7.4|^8.0|^8.1
License:MIT
Last Updated:Jul 11, 2022
Links: GitHub  ·  Packagist
Maintainer: hungthai1401

Laravel Domain Oriented

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

  1. Run this Composer command to install the latest version
composer require hungthai1401/laravel-domain-oriented --dev
  1. If you prefer, you can export the config files:
php artisan vendor:publish --provider="HT\LaravelDomainOriented\ServiceProvider" --tag="config"
  1. Run this command to build the domain structure:
php artisan domain:make Dummy
  1. And of course, if you want to remove the structure, just run this command:
php artisan domain:remove Dummy

Reading Articles

  1. Domain oriented Laravel
  2. Please, stop talking about Repository pattern with Eloquent

Related Packages

longman/laravel-platfourm

Package to implement right Repository/Service architecture in Laravel 5.x

642 8
oleglfed/laravel-ddd

Generates domains for laravel Domain Driven Development

1,445 22
morilog/flexible-repository

Flexible and powerful repositories for laravel framework

2,415 4
artesaos/shield

A simple way to centralize your validation rules for laravel

747 32
nwidart/laravel-broadway

A Laravel adapter for the Broadway ES/CQRS package.

15,015 123