Download the PHP package anteris-dev/domain-driven-laravel without Composer
On this page you can find all versions of the php package anteris-dev/domain-driven-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download anteris-dev/domain-driven-laravel
More information about anteris-dev/domain-driven-laravel
Files in anteris-dev/domain-driven-laravel
Package domain-driven-laravel
Short Description Easily interact with your Laravel application as a DDD app.
License
Informations about the package domain-driven-laravel
Transforms a default Laravel application into a Domain Driven Experience
This package is inspired by the work of Brent Roose and the Spatie team. Particularly by his Domain Driven Development blog posts.
By utilizing the commands provided in this package, you can convert your Laravel application into a Domain Driven experience by reorganizing the app structure and updating namespaces. Laravel Fortify and Jetstream are supported.
This package also provides several useful make commands for generating classes within the domain.
To Install
To Setup your Domain
First you will need to reorganize your application. You can do this by running the domain setup command:
Where {domain}
is the desired name of your domain.
This will perform the following actions.
- Create a directory in
app
with the name of your domain - If Fortify or Jetstream is installed, move their Actions into the domain directory
- The namespace of these actions is determined by whether or not Jetstream has team support installed. If team support is enabled, they will be placed in the
Team
namespace in your domain. Otherwise they will be placed in theUser
namespace
- The namespace of these actions is determined by whether or not Jetstream has team support installed. If team support is enabled, they will be placed in the
- Move models into their own namespace within this domain directory
- The namespace of the models is determined by the singular form of their filename. Models will be placed under this namespace in a
Models
directory - If Jetstream is installed with teams support, Jetstream models will be moved to the
Team
namespace
- The namespace of the models is determined by the singular form of their filename. Models will be placed under this namespace in a
- Move Laravel files to
app/Support
- Create an application layer directory at
app/App
- Update the bootstrap file to look for Laravel under
app/Support
- Update autoloading in composer
- Store the current domain in composer under
extra.laravel.domain
for use during file generation and namespace updates - Dump composer autoloads
Make Commands
This package provides the following make commands for your ease.
Command | Description |
---|---|
make:app:controller {layer} {name} | Creates a new application controller in the app/App/{layer}/Controllers directory. |
make:app:viewmodel {layer} {name} | Creates a new application view model in the app/App/{layer}/ViewModels directory. |
make:domain:action {subdomain} {name} | Creates a new action in the app/{domain}/{subdomain}/Actions directory. |
make:domain:dto {subdomain} {name} | Creates a new data transfer object in the app/{domain}/{subdomain}/DataTransferObjects directory. |
make:domain:model {subdomain} {name} | Creates a new model in the app/{domain}/{subdomain}/Models directory. |
All versions of domain-driven-laravel with dependencies
illuminate/database Version ^8.0
illuminate/filesystem Version ^8.0
illuminate/support Version ^8.0