Download the PHP package shahmy/laravel-ddd-toolkit without Composer

On this page you can find all versions of the php package shahmy/laravel-ddd-toolkit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-ddd-toolkit

laravel-ddd-toolkit

Artisan commands for enterprise Laravel Domain-Driven Design — scaffold complete bounded contexts in seconds.

Packagist Version PHP Laravel Tests


Overview

laravel-ddd-toolkit is a Composer package that brings a full suite of ddd:* Artisan commands to any Laravel application. It generates the complete DDD layer structure — Application, Domain, Infrastructure, Presentation, and Tests — along with typed PHP 8.3+ class stubs for every common DDD building block.

Works standalone from the command line. Pairs seamlessly with the Laravel DDD Architect VSCode extension.


Requirements


Installation

The service provider is auto-discovered. Publish the config file:

This creates config/ddd.php in your project.


Configuration

config/ddd.php:


Commands

Project initialization

Creates the src/ directory, scaffolds the Shared bounded context, and registers Src\\ in composer.json.


Domain scaffolding

Generates the full bounded context under src/Merchant/ with all layers and subfolders. Every empty directory receives a .gitkeep. A README.md and module.json are created at the domain root.


Class generators

All class generators follow the same pattern:

Command Output location Generated class
ddd:entity Domain/Entities/ Eloquent-backed domain entity
ddd:repository Domain/Repositories/ + Infrastructure/Persistence/Repositories/ Interface + Eloquent implementation
ddd:service Domain/Services/ Domain service
ddd:dto Application/DTOs/ readonly class with fromArray, fromRequest, toArray
ddd:action Application/Actions/ Single-responsibility action
ddd:usecase Application/UseCases/ Clean Architecture use case
ddd:event Domain/Events/ Immutable domain event
ddd:value-object Domain/ValueObjects/ readonly value object with invariant validation
ddd:enum Domain/Enums/ Backed PHP 8.1+ enum
ddd:policy Domain/ Laravel policy
ddd:resource Presentation/API/Resources/ API resource
ddd:request Presentation/API/Requests/ Form request
ddd:test Tests/Feature/ or Tests/Unit/ Pest or PHPUnit test

Examples:


Generated Domain Structure


Customising Stubs

Publish the built-in stubs to your project:

Stubs are copied to stubs/ddd/ in your project root. Edit them freely. The toolkit will use your versions automatically — published stubs always take precedence over the package defaults.

Stub placeholders use {{ PLACEHOLDER }} syntax (case-insensitive):

Placeholder Value
{{ NAMESPACE }} Full PSR-4 namespace for the class
{{ CLASS }} Class name
{{ DOMAIN }} Domain name

Package Architecture

Atomic operations — all file and directory creation runs inside a transaction. Any failure triggers a full rollback, leaving no partial structures on disk.


Testing

Code style is enforced by Laravel Pint:


VSCode Integration

This package works as a standalone CLI toolkit. If you use VSCode, the Laravel DDD Architect extension detects this package and delegates all generation commands to it — giving you the same results from the Command Palette or sidebar without typing Artisan commands manually.


Contributing

  1. Fork the repository and branch from main.
  2. Use Conventional Commits for commit messages.
  3. Ensure ./vendor/bin/pest passes and ./vendor/bin/pint --test reports no violations.
  4. Add a CHANGELOG.md entry under [Unreleased].
  5. Open a pull request.

Changelog

See CHANGELOG.md for release history.


License

MIT © shahmy


All versions of laravel-ddd-toolkit with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/console Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/filesystem Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/contracts Version ^9.0|^10.0|^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package shahmy/laravel-ddd-toolkit contains the following files

Loading the files please wait ...