laravel-architecture

Define Laravel 12 application structure with controllers, services, and actions.

Updated May 2, 2026
One-click install
npx skills add https://github.com/abdallhMoukdad/laravel-agent-skills --skill laravel-architecture-abdallhmoukdad
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-architecture
Source: https://github.com/abdallhMoukdad/laravel-agent-skills/tree/main/skills/laravel-architecture
Command: npx skills add https://github.com/abdallhMoukdad/laravel-agent-skills --skill laravel-architecture-abdallhmoukdad

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps developers organize and standardize the architecture of Laravel 12 applications, promoting clean, maintainable, and scalable codebases.

Core Features & Use Cases

  • Application Structuring: Guides on folder organization and design patterns like services, actions, and repositories.
  • Controller Best Practices: Emphasizes the controller contract and clean separation of concerns.
  • Use Case: Use this Skill to refactor a monolithic controller into discrete actions and services, improving testability and readability.

Quick Start

Use the laravel-architecture skill to design a new application structure that follows best practices for controllers, services, and actions.

Frequently Asked Questions about laravel-architecture

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

FAQPage Schema
How do I structure a Laravel application for better maintainability and scalability?

To structure a Laravel application for maintainability, implement discrete directories, controllers, services, and actions. This separation of concerns, guided by dependency injection, improves code clarity and ensures your Laravel app scales cleanly.

What is the best way to refactor a monolithic Laravel controller?

The best way to refactor a monolithic Laravel controller is to extract its logic into discrete actions and services. This refactoring enforces separation of concerns, significantly improving the testability and readability of your Laravel application.

When do I need to use services and actions in Laravel app architecture?

You need to use services and actions in Laravel app architecture when you want to enforce separation of concerns and improve code clarity. Organizing logic into these design patterns prevents bloated controllers and standardizes your application structure.

How does dependency injection improve Laravel app structure?

Dependency injection improves Laravel app structure by decoupling controllers from direct service instantiation. This practice supports clean architecture, making your Laravel application more maintainable, testable, and scalable through proper separation of concerns.

Does this Laravel architecture approach support the repository design pattern?

Yes, this Laravel architecture approach supports the repository design pattern alongside services and actions. Guiding folder organization with these design patterns helps standardize your application structure and enforces strict separation of concerns.

What are the limitations of refactoring Laravel controllers into actions and services?

Refactoring Laravel controllers into actions and services introduces additional directory layers and structural complexity. While it improves scalability and code clarity, developers must carefully manage dependency injection and folder organization to avoid over-engineering simple features.