laravel-patterns

Standardizes Laravel architecture decisions for controllers, requests, policies, and Eloquent usage.

1|Updated Aug 6, 2025
One-click install
npx skills add https://github.com/vix-4800/Workstation --skill laravel-patterns-vix-4800
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-patterns
Source: https://github.com/vix-4800/Workstation/tree/main/roles/ai-tools/files/agents/skills/laravel-patterns
Command: npx skills add https://github.com/vix-4800/Workstation --skill laravel-patterns-vix-4800

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Laravel codebases often drift into monolithic controllers and scattered validation, authorization, and Eloquent usage patterns, causing maintenance pain and inconsistent reviews.

Core Features & Use Cases

  • Keeps controllers thin and focused on transport.
  • Centralizes validation with Form Requests or explicit DTO mapping.
  • Standardizes authorization with Policies and recommended Eloquent patterns.

Quick Start

Analyze the current Laravel project structure and output a prioritized refactor plan.

Frequently Asked Questions about laravel-patterns

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

FAQPage Schema
How do I keep Laravel controllers thin and focused on transport?

To keep Laravel controllers thin, move validation into Form Requests and centralize authorization using Policies. This ensures controllers handle only transport, leaving business logic to service objects.

What is the best way to centralize validation and authorization in Laravel?

The best way to centralize validation and authorization in Laravel is by using Form Requests for explicit boundary validation and Policies for centralized authorization rules.

How do I standardize architecture decisions when refactoring a Laravel project?

Standardize Laravel architecture decisions by analyzing the current project structure to output a prioritized refactor plan. This enforces explicit validation, centralized authorization, and disciplined Eloquent data access.

Can I use this to onboard new developers to an existing Laravel codebase?

Yes, you can use these Laravel conventions to onboard new developers by applying standardized patterns for controllers, form requests, policies, and service objects during code reviews.

Why does my Laravel codebase have scattered Eloquent usage and validation patterns?

Laravel codebases develop scattered Eloquent usage and validation patterns when architecture decisions drift into monolithic controllers. Enforcing disciplined data access and explicit boundary validation resolves this maintenance pain.