laravel-patterns

Structure Laravel controllers, services, actions, models, and API resources.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/mkopcic/md-solutions.hr-racuni-app --skill laravel-patterns-mkopcic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-patterns
Source: https://github.com/mkopcic/md-solutions.hr-racuni-app/tree/main/.github/skills/laravel-patterns
Command: npx skills add https://github.com/mkopcic/md-solutions.hr-racuni-app --skill laravel-patterns-mkopcic

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Laravel development patterns provide a structured blueprint to build scalable, maintainable Laravel applications by enforcing consistent architecture.

Core Features & Use Cases

  • Clear layering: Controllers, Services, Actions, and Models to separate concerns.
  • API design and resources: structured responses, pagination, and request validation.
  • Reusable patterns: Eloquent design, query objects, global scopes, and typed models.
  • Production readiness: queues, events, caching, logging, and environment configuration.

Quick Start

Organize a new Laravel project using the Controllers -> Services -> Actions structure and set up the recommended layout.

Frequently Asked Questions about laravel-patterns

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

FAQPage Schema
How do I structure a scalable Laravel application with controllers, services, and actions?

Structure a scalable Laravel application by separating concerns across Controllers, Services, Actions, and Models to enforce clear layering. This blueprint provides a consistent architecture for maintainable application development.

What is the best way to design API resources and request validation in Laravel?

Design API resources in Laravel by using structured responses, pagination, and form requests for validation. This approach ensures production-ready, consistent API outputs and separates validation logic from controllers.

How do I implement query objects and typed models for Laravel Eloquent?

Implement query objects and typed models in Laravel Eloquent to encapsulate complex database queries and enforce data integrity. This reusable pattern keeps model scopes clean and centralizes query constraints.

Do I need queues, events, and caching for a production-ready Laravel project?

Queues, events, and caching are required for a production-ready Laravel project to handle asynchronous processing and improve performance. The architecture guidance configures these components alongside logging and environment setup.

Can I apply these Laravel architecture patterns to an existing project?

You can apply these Laravel architecture patterns to existing projects by incrementally refactoring into Controllers, Services, and Actions. The guidelines satisfy requirements for clear project structure, typed models, and query objects.