PHPackages                             jair921/laravel-domain-commands - 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. [CLI &amp; Console](/categories/cli)
4. /
5. jair921/laravel-domain-commands

ActiveLibrary[CLI &amp; Console](/categories/cli)

jair921/laravel-domain-commands
===============================

Artisan commands to Laravel apps that utilizes Domain Driven Design. Based on notiv/laravel-domain-commands

0.0.2(3y ago)081MITPHP

Since Aug 2Pushed 3y agoCompare

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

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

Laravel Domain Commands
=======================

[](#laravel-domain-commands)

Installation
============

[](#installation)

```
composer require jair921/laravel-domain-commands

```

You can publish config, if you want

```
php artisan vendor:publish --tag="domain-commands-config"

```

Domain Commands
---------------

[](#domain-commands)

- `make:model `

    Create a new Eloquent model class

    *Example:* `php artisan make:model User:User`

    **Options:**

    - `--force` Create the class even if the model already exists
    - `-a, --all` Generate a migration, seeder &amp; factory for the model
    - `-f, --factory` Create a new factory for the model
    - `-m, --migration` Create a new migration file for the model
    - `-s, --seed` Create a new seeder file for the model
    - `-p, --pivot` Indicates if the generated model should be a custom intermediate table model
- `make:action `

    Create an action for a given domain

    *Example:* `php artisan make:action User:CreateUserAction`
- `make:dto `

    Create a dto for a given domain

    *Example:* `php artisan make:dto User:CreateUserDTO`

    > You should install  for convenience

    **Options:**

    - `-r, --request` DTO file with static fromRequest method
- `make:cast `

    Create a new custom Eloquent cast class

    *Example:* `php artisan make:cast User:JsonCast`
- `make:collection `

    Create a collection for a given domain

    *Example:* `php artisan make:collection User:UserCollection`
- `make:event `

    Create a new event class

    *Example:* `php artisan make:event User:UserCreatedEvent`
- `make:enum `

    Create an enum for a given domain

    *Example:* `php artisan make:enum User:UserColorEnum`
- `make:listener `

    Create a new event listener class

    *Example:* `php artisan make:listener User:SendSlackMessage -e User:UserCreatedEvent --queued`

    **Options:**

    - `--queued` Indicates the event listener should be queued
    - `-e, --event=` The event class being listened for
- `make:observer `

    Create a new observer class

    *Example:* `php artisan make:observer User:UserObserver -m User:User`

    **Options:**

    - `-m, --model=` The model that the observer applies to
- `make:policy `

    Create a new policy class

    *Example:* `php artisan make:policy User:UserPolicy -m User:Post`

    **Options:**

    - `-m, --model=` The model that the policy applies to
    - `-g, --guard=` The guard that the policy relies on
- `make:query-builder `

    Create a query builder for a given domain

    *Example:* `php artisan make:query-builder User:UserQueryBuilder`
- `make:rule `

    Create a new validation rule

    *Example:* `php artisan make:rule User:PasswordMinlengthRule`

    **Options:**

    - `-i, --implicit` Generate an implicit rule

---

Application Commands
--------------------

[](#application-commands)

- `make:controller `

    Create a new controller class

    *Example:* `php artisan make:controller User:UserController`

    **Options:**

    - `--force` Create the class even if the controller already exists
    - `--api` Exclude the create and edit methods from the controller
    - `-i, --invokable` Generate a single method, invokable controller class
    - `-m , --model=` Generate a resource controller for the given model
    - `-p , --parent=` Generate a nested resource controller class
    - `-r, --resource` Generate a resource controller class
- `make:request `

    Create a new form request class

    *Example:* `php artisan make:request User:LoginRequest`
- `make:job `

    Create a new job class

    *Example:* `php artisan make:job User:SendMessageJob`

    **Options:**

    - `--sync` Indicates that job should be synchronous
- `make:mail `

    Create a new email class

    *Example:* `php artisan make:mail User:WelcomeUser`

    **Options:**

    - `-f, --force` Create the class even if the mailable already exists
    - `-m, --markdown[=MARKDOWN]` Create a new Markdown template for the mailable
- `make:notification `

    Create a new notification class

    *Example:* `php artisan make:notification User:InvoicePaid`

    **Options:**

    - `-f, --force` Create the class even if the notification already exists
    - `-m, --markdown[=MARKDOWN]` Create a new Markdown template for the notification
- `make:middleware `

    Create a new middleware class

    *Example:* `php artisan make:middleware User:AuthMiddleware`
- `make:resource `

    Create a new resource class

    *Example:* `php artisan make:resource User:UserResource`

    **Options:**

    - `-c, --collection` Create a resource collection
- `make:component `

    Create a new view component class

    *Example:* `php artisan make:component User:UserComponent`

    **Options:**

    - `--force` Create the class even if the component already exists
    - `--inline` Create a component that renders an inline view
- `make:view-model `

    Create a view-model for a given app

    *Example:* `php artisan make:view-model User:UsersViewModel`

---

Database Commands
-----------------

[](#database-commands)

- `make:factory `

    Create a new model factory

    *Example:* `php artisan make:factory UserFactory`

    **Options:**

    - `-m , --model=` Bind factory to the model

---

TODO:
-----

[](#todo)

- **ADD TESTS**
- `make:model --auth` ?
- `make:state [domain:name]`
- `make:{http query builder} [app:name]`

Thanks
------

[](#thanks)

-  and
-

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 95.7% 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

Every ~15 days

Total

2

Last Release

1364d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/06cc2a7ffe788bca8cc994531b79df2229a36dc70b026aca269d1ae4cd904434?d=identicon)[jair921](/maintainers/jair921)

---

Top Contributors

[![notiv-nt](https://avatars.githubusercontent.com/u/10743009?v=4)](https://github.com/notiv-nt "notiv-nt (22 commits)")[![jair9211](https://avatars.githubusercontent.com/u/104784730?v=4)](https://github.com/jair9211 "jair9211 (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jair921-laravel-domain-commands/health.svg)

```
[![Health](https://phpackages.com/badges/jair921-laravel-domain-commands/health.svg)](https://phpackages.com/packages/jair921-laravel-domain-commands)
```

###  Alternatives

[acdphp/laravel-schedule-police

Stop, start or execute scheduled commands from a simple dashboard without redeploying, while maintaining the visibility, control, and reviewability of the configurations in your codebase.

5116.9k](/packages/acdphp-laravel-schedule-police)[jakyeru/laravel-shell

Laravel-Shell adds a terminal interface to your web application, allowing you to run shell commands directly from your browser.

166.1k](/packages/jakyeru-laravel-shell)

PHPackages © 2026

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