بنقرة واحدة
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 المهني
Ensures correct execution order of migrations, seeders, and tests in CI
Defines DTO structure, lifecycle, and transformation rules across the application
Handles Filament multi-tenancy: tenant scoping, TenantAware trait, observer behaviour, isScopedToTenant, and tenant switching. Activates when adding tenant-aware models, fixing company_id scoping, working with Filament::getTenant, debugging tenant isolation, or when the user mentions company scope, tenant, multi-tenancy, or company_id.
Configures Filament panel providers. Activates when adding a new panel, registering module resources in a panel, configuring tenant middleware, adjusting auth or theme settings, or when the user mentions PanelProvider, viteTheme, discoverResources, or panel configuration.
Defines the Filament v4 resource page structure used in this project: Resource + Pages + Schemas + Tables split, action patterns, and BaseResource conventions.
Creates and modifies code inside a modular Laravel structure. Targets internachi/modular (modules as real Composer packages with src/). Activates when adding a new module, adding a model/factory/migration/resource/service to an existing module, registering a module with Filament, or when the user mentions modules, modular, or a specific module name.
| 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 for Filament → Service calls. Arrays are fine when the source is a trusted Filament form.
Use DTOs when:
Skip DTOs when:
Filament closures do not support constructor DI. app() is the only acceptable
escape hatch — and it belongs in the closure, not inside the service:
Action::make('create')
->action(function (array $data) {
app(InvoiceService::class)->createInvoice($data);
});
Modules/{Name}/Services/{Model}Service.php
Standard method names: createX, updateX, deleteX, findOrFail, listForCompany.