service-provider-architecture

Generates Model, Service, Controller, and Policy scaffolding for Laravel domains.

Updated Feb 8, 2026
One-click install
npx skills add https://github.com/bramato/laravel-react-plugins --skill service-provider-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: service-provider-architecture
Source: https://github.com/bramato/laravel-react-plugins/tree/main/laravel-react/skills/service-provider-architecture
Command: npx skills add https://github.com/bramato/laravel-react-plugins --skill service-provider-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the challenge of maintaining organized, scalable, and testable codebases in Laravel applications by enforcing a consistent Service Provider pattern.

Core Features & Use Cases

  • Domain-Driven Structure: Organizes code into logical layers (Models, DTOs, Services, Controllers, Policies, etc.) based on domain entities.
  • Separation of Concerns: Ensures business logic resides in Services, validation in FormRequests, and authorization in Policies, leading to cleaner code.
  • Testability: Promotes unit and feature testability by decoupling logic into distinct, mockable components.
  • Use Case: When scaffolding a new feature like user authentication or order management, this Skill provides the blueprint for creating all necessary components (Models, Services, Controllers, etc.) in a standardized way.

Quick Start

Use the service-provider-architecture skill to generate the boilerplate code for a new 'Product' domain, including Model, Service, Controller, and Policy files.

Frequently Asked Questions about service-provider-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a Laravel app using domain-driven design?

To structure a Laravel app with domain-driven design, you organize code into logical layers like Models, DTOs, Services, and Controllers. This enforces separation of concerns by placing business logic in Services and validation in FormRequests for maintainable codebases.

What is the best way to separate business logic in Laravel controllers?

The best way to separate business logic in Laravel is by moving it into dedicated Service classes. Controllers handle HTTP requests, Services manage business logic, and FormRequests manage validation, creating a clean, testable codebase.

How do I scaffold a new domain entity in Laravel without creating boilerplate manually?

You can scaffold a complete domain entity in Laravel by generating standardized boilerplate for Models, DTOs, Services, Controllers, Policies, Events, and Listeners. This provides a blueprint for creating all necessary components in a standardized directory structure.

Does domain-driven design work with standard Laravel directory conventions?

Yes, domain-driven design integrates with Laravel by enforcing a standardized directory convention. It organizes domain entities into distinct layers including Models, Services, Policies, and Resources, replacing the default flat directory structure with a scalable layer architecture.

When should I use DTOs in Laravel applications?

You should use DTOs in Laravel applications when decoupling logic into distinct, mockable components to improve testability. DTOs facilitate transferring data between layers while maintaining a strict separation of concerns within your domain-driven architecture.