apsg/domains

Setup helper for DDD approach in Laravel

0.2.1 2020-09-25 11:29 UTC

This package is auto-updated.

Last update: 2024-10-25 20:14:35 UTC


README

Latest Version on Packagist Total Downloads StyleCI

Laravel DDD

Laravel (5,6,7) setup helper for DDD approach

This package became pretty obsolete with introduction of Laravel 8, so no further updates would be provided.

What it does?

  1. It changes namespace in RouteServiceProvider from App\Http\Controllers to nothing.
  2. It creates some directories for domains.
  3. It fixes Auth routes for you (since it is no longer possible to use Auth::routes() helper).
  4. (optionally) It provides examples of usage.

Installation

composer require apsg/domains --dev

Basic usage

After fresh installation of Laravel (presumably with --auth option for laravel/ui) just run Artisan command:

php artisan ddd:setup

One can also autogenerate some examples with --examples option:

php artisan ddd:setup --examples

Cleanup

If you are happy with the outcome you can now remove the package entirely since it is no longer needed.

Just run:

composer remove apsg/domains