laravel-patterns

Enforce clean architecture and reusable patterns for Laravel 11+ projects.

3|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/bipinks/ghost-office --skill laravel-patterns-bipinks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-patterns
Source: https://github.com/bipinks/ghost-office/tree/main/.claude/skills/laravel-patterns
Command: npx skills add https://github.com/bipinks/ghost-office --skill laravel-patterns-bipinks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This collection provides a structured blueprint for building Laravel 11+ applications with a clean architecture, a robust service layer, and consistent domain-driven patterns across modules.

Core Features & Use Cases

  • Application architecture: organized directories (Models, Services, Http, Policies, Events, Listeners, Jobs, Providers) that promote maintainability and testability.
  • Service layer & domain patterns: guidelines for isolating business logic from controllers and models, enabling easier testing and reuse.
  • Eloquent & API patterns: multi-tenant aware models, resource controllers, form requests, and API resources to standardize data access and responses.
  • Use Case: when building a Laravel 11+ project, apply these patterns to structure code for scalability, testability, and team collaboration.

Quick Start

Set up a Laravel 11+ project and apply the architecture and patterns described to organize code, services, and resources efficiently.

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 Laravel application for clean architecture and scalability?

Structure Laravel applications by enforcing organized directories for Models, Services, Http, and Events to isolate business logic. This service layer pattern promotes maintainability, testability, and team collaboration across modules.

What is the best way to isolate business logic from Laravel Eloquent models and controllers?

Isolate business logic from controllers and models by implementing a dedicated service layer. This domain-driven pattern separates validation and data access, enabling easier testing and reusable code across your application.

How do I implement multi-tenant data access in Laravel Eloquent models?

Implement multi-tenant data access in Laravel Eloquent by applying tenant-aware model patterns. This standardizes data retrieval and ensures resource controllers properly scope database queries to the correct tenant boundaries.

Does this Laravel service layer pattern support Laravel 11 projects?

Yes, this service layer pattern explicitly supports Laravel 11 and newer projects. It provides structured module boundaries, consistent form request validation, and practical code examples tailored for the Laravel 11+ framework.

How do I standardize API responses in Laravel using resources and form requests?

Standardize Laravel API responses by utilizing API resources and form requests. This pattern ensures consistent data transformation and validation before data reaches your resource controllers, creating predictable outputs.

Why use a domain-driven service layer for Laravel testing instead of testing controllers directly?

Use a domain-driven service layer for Laravel testing to isolate business logic from HTTP requests. This pattern makes testing easier by allowing you to directly test services and jobs without simulating full controller middleware.