Skip to content

Domain commands

These package commands generate Domain roots and types. Their syntax and output patterns are generated from the manifest.

make:action

Create a new domain action class

Synopsis

make:action <name> <domain>

Arguments and options

  • name — The name of the action
  • domain — The name of the domain

Use

Prerequisites
Use a valid generated type name and create its required parent Service or Domain first.
Effect
Creates the selected generated application type at the manifest-defined path.
Generated paths or files
app/Pulsar/Domain/{Domain}/Actions/{Name}.php
Success output shape
Reports the command outcome; file generators report their generated location.
Expected failures
Invalid names, missing parents, and duplicate target files fail without replacing an existing file.
Overwrite policy
Existing generated files are not overwritten.

Checked example

pulsar make:action Example Orders

See the related reference.

make:contract

Create a new domain contract interface

Synopsis

make:contract <name> <domain>

Arguments and options

  • name — The capability name of the contract
  • domain — The name of the owning domain

Use

Prerequisites
Use a valid generated type name and create its required parent Service or Domain first.
Effect
Creates the selected generated application type at the manifest-defined path.
Generated paths or files
app/Pulsar/Domain/{Domain}/Contracts/{Name}.php
Success output shape
Reports the command outcome; file generators report their generated location.
Expected failures
Invalid names, missing parents, and duplicate target files fail without replacing an existing file.
Overwrite policy
Existing generated files are not overwritten.

Checked example

pulsar make:contract Example Orders

See the related reference.

make:domain

Create a new domain

Synopsis

make:domain <name>

Arguments and options

  • name — The name of the domain

Use

Prerequisites
Use a valid, unused architectural name.
Effect
Creates the named architectural root and its generated support files.
Generated paths or files
app/Pulsar/Domain/{Domain}/.gitkeep
Success output shape
Reports the command outcome; file generators report their generated location.
Expected failures
Duplicate or invalid names fail before a partial generated structure is written.
Overwrite policy
Existing generated roots are not overwritten.

Checked example

pulsar make:domain

See the related reference.

make:dto

Create a new domain DTO class

Synopsis

make:dto <name> <domain>

Arguments and options

  • name — The name of the DTO
  • domain — The name of the domain

Use

Prerequisites
Use a valid generated type name and create its required parent Service or Domain first.
Effect
Creates the selected generated application type at the manifest-defined path.
Generated paths or files
app/Pulsar/Domain/{Domain}/DTOs/{Name}.php
Success output shape
Reports the command outcome; file generators report their generated location.
Expected failures
Invalid names, missing parents, and duplicate target files fail without replacing an existing file.
Overwrite policy
Existing generated files are not overwritten.

Checked example

pulsar make:dto Example Orders

See the related reference.

make:enum

Create a new domain enum

Synopsis

make:enum <name> <domain>

Arguments and options

  • name — The name of the enum
  • domain — The name of the domain

Use

Prerequisites
Use a valid generated type name and create its required parent Service or Domain first.
Effect
Creates the selected generated application type at the manifest-defined path.
Generated paths or files
app/Pulsar/Domain/{Domain}/Enums/{Name}.php
Success output shape
Reports the command outcome; file generators report their generated location.
Expected failures
Invalid names, missing parents, and duplicate target files fail without replacing an existing file.
Overwrite policy
Existing generated files are not overwritten.

Checked example

pulsar make:enum Example Orders

See the related reference.

make:event

Create a new domain event class

Synopsis

make:event <name> <domain>

Arguments and options

  • name — The name of the event
  • domain — The name of the domain

Use

Prerequisites
Use a valid generated type name and create its required parent Service or Domain first.
Effect
Creates the selected generated application type at the manifest-defined path.
Generated paths or files
app/Pulsar/Domain/{Domain}/Events/{Name}.php
Success output shape
Reports the command outcome; file generators report their generated location.
Expected failures
Invalid names, missing parents, and duplicate target files fail without replacing an existing file.
Overwrite policy
Existing generated files are not overwritten.

Checked example

pulsar make:event Example Orders

See the related reference.

make:exception

Create a new domain exception class

Synopsis

make:exception <name> <domain>

Arguments and options

  • name — The name of the exception
  • domain — The name of the domain

Use

Prerequisites
Use a valid generated type name and create its required parent Service or Domain first.
Effect
Creates the selected generated application type at the manifest-defined path.
Generated paths or files
app/Pulsar/Domain/{Domain}/Exceptions/{Name}.php
Success output shape
Reports the command outcome; file generators report their generated location.
Expected failures
Invalid names, missing parents, and duplicate target files fail without replacing an existing file.
Overwrite policy
Existing generated files are not overwritten.

Checked example

pulsar make:exception Example Orders

See the related reference.

make:listener

Create a new domain event listener

Synopsis

make:listener [--event EVENT] [--queued] [--] <name> <domain>

Arguments and options

  • name — The name of the listener
  • domain — The name of the domain
  • --event=VALUE — The event class or FQCN to listen for
  • --queued — Generate an after-commit queued listener

Use

Prerequisites
Use a valid generated type name and create its required parent Service or Domain first.
Effect
Creates the selected generated application type at the manifest-defined path.
Generated paths or files
app/Pulsar/Domain/{Domain}/Listeners/{Name}.php
Success output shape
Reports the command outcome; file generators report their generated location.
Expected failures
Invalid names, missing parents, and duplicate target files fail without replacing an existing file.
Overwrite policy
Existing generated files are not overwritten.

Checked example

pulsar make:listener SendReceipt Billing --event=OrderPaid --queued

See the related reference.

make:mailable

Create a new domain mailable

Synopsis

make:mailable <name> <domain>

Arguments and options

  • name — The name of the mailable
  • domain — The name of the domain

Use

Prerequisites
Use a valid generated type name and create its required parent Service or Domain first.
Effect
Creates the selected generated application type at the manifest-defined path.
Generated paths or files
app/Pulsar/Domain/{Domain}/Mail/{Name}.php
Success output shape
Reports the command outcome; file generators report their generated location.
Expected failures
Invalid names, missing parents, and duplicate target files fail without replacing an existing file.
Overwrite policy
Existing generated files are not overwritten.

Checked example

pulsar make:mailable Example Orders

See the related reference.

make:model

Create a new domain model class

Synopsis

make:model <name> <domain>

Arguments and options

  • name — The name of the model
  • domain — The name of the domain

Use

Prerequisites
Use a valid generated type name and create its required parent Service or Domain first.
Effect
Creates the selected generated application type at the manifest-defined path.
Generated paths or files
app/Pulsar/Domain/{Domain}/Models/{Name}.php
Success output shape
Reports the command outcome; file generators report their generated location.
Expected failures
Invalid names, missing parents, and duplicate target files fail without replacing an existing file.
Overwrite policy
Existing generated files are not overwritten.

Checked example

pulsar make:model Example Orders

See the related reference.

make:notification

Create a new domain notification

Synopsis

make:notification <name> <domain>

Arguments and options

  • name — The name of the notification
  • domain — The name of the domain

Use

Prerequisites
Use a valid generated type name and create its required parent Service or Domain first.
Effect
Creates the selected generated application type at the manifest-defined path.
Generated paths or files
app/Pulsar/Domain/{Domain}/Notifications/{Name}.php
Success output shape
Reports the command outcome; file generators report their generated location.
Expected failures
Invalid names, missing parents, and duplicate target files fail without replacing an existing file.
Overwrite policy
Existing generated files are not overwritten.

Checked example

pulsar make:notification Example Orders

See the related reference.

make:policy

Create a new domain policy class

Synopsis

make:policy [--model MODEL] [--] <name> <domain>

Arguments and options

  • name — The name of the policy
  • domain — The name of the domain
  • --model=VALUE — The domain model protected by the policy

Use

Prerequisites
Use a valid generated type name and create its required parent Service or Domain first.
Effect
Creates the selected generated application type at the manifest-defined path.
Generated paths or files
app/Pulsar/Domain/{Domain}/Policies/{Name}.php
Success output shape
Reports the command outcome; file generators report their generated location.
Expected failures
Invalid names, missing parents, and duplicate target files fail without replacing an existing file.
Overwrite policy
Existing generated files are not overwritten.

Checked example

pulsar make:policy OrderPolicy Orders --model=Order

See the related reference.

make:query

Create a new domain query class

Synopsis

make:query <name> <domain>

Arguments and options

  • name — The name of the query
  • domain — The name of the domain

Use

Prerequisites
Use a valid generated type name and create its required parent Service or Domain first.
Effect
Creates the selected generated application type at the manifest-defined path.
Generated paths or files
app/Pulsar/Domain/{Domain}/Queries/{Name}.php
Success output shape
Reports the command outcome; file generators report their generated location.
Expected failures
Invalid names, missing parents, and duplicate target files fail without replacing an existing file.
Overwrite policy
Existing generated files are not overwritten.

Checked example

pulsar make:query Example Orders

See the related reference.

make:value-object

Create a new domain Value Object

Synopsis

make:value-object <name> <domain>

Arguments and options

  • name — The name of the Value Object
  • domain — The name of the domain

Use

Prerequisites
Use a valid generated type name and create its required parent Service or Domain first.
Effect
Creates the selected generated application type at the manifest-defined path.
Generated paths or files
app/Pulsar/Domain/{Domain}/ValueObjects/{Name}.php
Success output shape
Reports the command outcome; file generators report their generated location.
Expected failures
Invalid names, missing parents, and duplicate target files fail without replacing an existing file.
Overwrite policy
Existing generated files are not overwritten.

Checked example

pulsar make:value-object Example Orders

See the related reference.