PHPackages                             repositoriomaster/domain-maker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. repositoriomaster/domain-maker

ActivePackage[Framework](/categories/framework)

repositoriomaster/domain-maker
==============================

Domain Driven Design for Laravel

1.0.0(2y ago)0231MITPHP

Since Sep 10Pushed 2y agoCompare

[ Source](https://github.com/repositoriomaster/domain-maker)[ Packagist](https://packagist.org/packages/repositoriomaster/domain-maker)[ RSS](/packages/repositoriomaster-domain-maker/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Domain Maker for Laravel
========================

[](#domain-maker-for-laravel)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

The Why
-------

[](#the-why)

Domain Driven Design helps us to organize our thoughts and to build apps using logical grouping of our code.

If you've ever worked on a large laravel project you know how that model directory can grow so large that your ability to find things becomes hampered.

I was inspired by this article  from Freek at Spatie to refactor to Domains. I love it! It makes it so much easier to focus on a specific issue without the need to traverse the entire code base. If I'm working on Payments, I live in the payments Domain.

I soon realized refactoring to DDD is pretty straight forward, but the typically wonderful development experience I've grown used to with laravel left a bit to be desired.

Also, what if I know my project is going to be large, and I want to get a head start and begin development using DDD?

That's why this package exists.

How can Domain Maker help you?
------------------------------

[](#how-can-domain-maker-help-you)

Domain Maker makes Domain Driven Development easier in Laravel by providing you with a set of commands to create the scaffolding and boilerplate laravel normally provides but tailored to a Domain Oriented Structure.

- Helpful Commands to:
    - Automatically scaffold a new Domain with the often needed directories and classes
    - create controllers
    - create route files
    - create models
    - create repositories
- Automatic Routes discovery (no need to register routes in the RouteServiceProvider)
- Automatic View discovery (no need to add view path to config)

### All Domain Maker Commands are under the prefix domain.

[](#all-domain-maker-commands-are-under-the-prefix-domain)

```
 domain:make:controller        Create a new controller class
 domain:make:domain            Create a new Domain
 domain:make:routes            Create a new routes for domain
 ...
```

Install
-------

[](#install)

```
composer require repositoriomaster/domain-maker
```

Usage
-----

[](#usage)

### Create new Domain

[](#create-new-domain)

```
php artisan domain:make:domain
```

If this is the first domain the Domains directory will be created under app/Domains along with the specified domain.

```
Domains
└── Media
    ├── Exceptions
    ├── Http
    │   ├── Controllers
    │   │   ├── VimeoController.php
    │   │   └── YoutubeController.php
    │   ├── Middleware
    │   └── Requests
    │       └── YoutubeRequest.php
    ├── Jobs
    │   └── YoutubeSync.php
    ├── Models
    │   └── Youtube.php
    ├── Repositories
    │   └── YoutubeRepository.php
    ├── resources
    │   ├── css
    │   ├── js
    │   └── views
    │       └── youtube-home.blade.php
    ├── routes
    │   ├── Media.php
    │   ├── Vimeo.php
    │   └── Youtube.php
    └── Services

```

### Routing

[](#routing)

A standard route file is created when you create a domain via the `domain:make:domain` command.

> Routes are discovered automatically via the DomainRouteServiceProvider

To create subsequent route files use:

```
domain:make:routes
```

For example, if I have a "Payments" domain, and I'd like to group my Stripe Routes I'd run the command like so:

```
domain:make:routes Payments Stripe
```

### Repositories

[](#repositories)

A repository with standard CRUDs can easily be generate by using the `domain:make:repository`.

```
domain:make:repository
```

Using the "Payments" domain again to demonstrate, we can use the command as follows:

```
domain:make:repository Payments PaymentRepository Payment
```

### Stubs

[](#stubs)

Public stubs will be used as a default. If stubs are unpublished, backups are contained in the package.

There are package specific stubs that you may publish to override (i.e., routes.stub)

> If you don't need to make changes to the stubs it's not necessary to publish them.

```
php artisan vendor:publish --tag=domain-stubs
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Richard Rohrig](https://github.com/repositoriomaster)
- [All Contributors](https://github.com/repositoriomaster/domain-maker/contributors)

Security
--------

[](#security)

If you discover any security-related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](/LICENSE.md) for more information.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 78.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

972d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/42e06b57285f2e445b7cabd247a0549e5d3887a714e4a2c42c5686fba89e4fd6?d=identicon)[repositoriomaster](/maintainers/repositoriomaster)

---

Top Contributors

[![rohrig](https://avatars.githubusercontent.com/u/45824492?v=4)](https://github.com/rohrig "rohrig (29 commits)")[![repositoriomaster](https://avatars.githubusercontent.com/u/44373748?v=4)](https://github.com/repositoriomaster "repositoriomaster (4 commits)")[![Julius-Bendt](https://avatars.githubusercontent.com/u/22844949?v=4)](https://github.com/Julius-Bendt "Julius-Bendt (2 commits)")[![drpshtiwan](https://avatars.githubusercontent.com/u/6718949?v=4)](https://github.com/drpshtiwan "drpshtiwan (1 commits)")[![hakimzulkufli](https://avatars.githubusercontent.com/u/42469039?v=4)](https://github.com/hakimzulkufli "hakimzulkufli (1 commits)")

---

Tags

laravel

### Embed Badge

![Health badge](/badges/repositoriomaster-domain-maker/health.svg)

```
[![Health](https://phpackages.com/badges/repositoriomaster-domain-maker/health.svg)](https://phpackages.com/packages/repositoriomaster-domain-maker)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k96.9M672](/packages/laravel-socialite)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k84.2M224](/packages/laravel-horizon)[laravel/ui

Laravel UI utilities and presets.

2.7k134.9M597](/packages/laravel-ui)[laravel/sail

Docker files for running a basic Laravel application.

1.9k186.9M1.0k](/packages/laravel-sail)[laravel/jetstream

Tailwind scaffolding for the Laravel framework.

4.1k19.8M136](/packages/laravel-jetstream)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M256](/packages/laravel-dusk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
