ワンクリックで
service-layer
Defines application service structure and business orchestration boundaries
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Defines application service structure and business orchestration boundaries
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Defines structural rules for Laravel architecture, layering, and code organization
Defines DTO structure, lifecycle, and transformation rules across the application
Governs safe, incremental, repository-wide development workflow with continuous validation gates
Ensures correct execution order of migrations, seeders, and tests in CI
Defines the schema-to-factory-to-seeder contract chain — NOT NULL alignment, factory/seeder ownership boundaries, and schema drift rules
Defines GitHub Actions configuration for running PHP/Laravel CI pipeline
| name | service-layer |
| description | Defines application service structure and business orchestration boundaries |
| license | MIT |
| metadata | {"author":"project"} |
Services are the only place business logic lives. They are framework-agnostic.
Services MUST:
Services MUST NOT:
app() or resolve() internallyConstructor injection only:
public function __construct(
private InvoiceRepository $repository
) {}
DTOs are not required when the source is a validated FormRequest::validated()
array. Arrays are fine there.
Use DTOs when:
Skip DTOs when:
app/Services/{Domain}/{Model}Service.php
e.g. app/Services/Task/TaskService.php, app/Services/Offer/OfferService.php.
Standard method names: create, update, delete, findByExternalId. Prefer
one service class per domain holding both create/update (see TaskService)
over splitting into separate per-action service classes.