Build Production-Ready Laravel Applications
A senior Laravel engineering skill for production-grade features, thin controllers, and idiomatic Laravel 10/11+ architecture.
Why it matters
Leverage expert Laravel development knowledge to build robust, maintainable, and secure web applications. This skill focuses on modern Laravel practices for new features, refactoring, and API design.
Outcomes
What it gets done
Generate idiomatic Laravel code following clean architecture principles.
Refactor legacy Laravel code to improve readability and testability.
Design and implement secure authentication and authorization logic.
Optimize Eloquent queries and database interactions for performance.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/ag-laravel-expert | bash Overview
Laravel Expert
A senior Laravel engineering skill for production-grade, idiomatic Laravel 10/11+ solutions - thin controllers, service-layer architecture, and secure API design. Use it for Laravel-based feature development, refactoring, or code review, not for framework-agnostic PHP or non-backend tasks.
What it does
Laravel Expert acts as a senior Laravel engineer producing production-grade, maintainable, idiomatic solutions for Laravel 10/11+, prioritizing clean architecture, readability, testability, security, performance awareness, and convention over configuration. Its architecture principles: keep controllers thin, move business logic into Services, validate with FormRequest classes, shape API responses with API Resources, authorize with Policies/Gates, apply dependency injection, and avoid static abuse or global state. Database guidance covers using guarded/fillable correctly, avoiding N+1 queries via eager loading, preferring query scopes over raw queries, and wrapping critical operations in transactions; API guidance covers standardized JSON structure, proper HTTP status codes, pagination, and rate limiting; and authentication guidance prefers Laravel's native auth system and Sanctum for SPA/API use, with secure password hashing and no sensitive data exposed in responses.
When to use - and when NOT to
Use this skill when building new Laravel features, refactoring legacy Laravel code, designing APIs, creating validation logic, implementing authentication or authorization, structuring services and business logic, optimizing database interactions, or reviewing Laravel code quality. Don't use it if the project isn't Laravel-based, the task is framework-agnostic PHP only, the user wants a non-PHP solution, or the task is unrelated to backend engineering. Named anti-patterns to avoid: fat controllers, business logic in routes, massive service classes, direct model manipulation without validation, blind mass assignment, hardcoded configuration values, and duplicated logic across controllers. Its behavioral constraints favor Laravel-native solutions over third-party packages, avoid unnecessary abstractions or microservice architecture unless requested, and assume no particular cloud infrastructure.
Inputs and outputs
Input is a Laravel feature request, a refactoring target, or existing code to review; output follows a fixed structure depending on the task - designing a feature returns an architecture overview, file structure, code implementation, explanation, and possible improvements; refactoring returns identified issues, the refactored version, and why it's better. Generated code includes namespace declarations, strict typing where possible, PSR-standard formatting, proper return types, and minimal but meaningful comments.
Routing follows route-model binding with logically grouped routes, proper middleware, and web/API routes kept separate; queues offload heavy operations to dispatchable jobs with idempotency where needed; caching wraps expensive queries with cache tags where supported and proper invalidation; and Blade views escape user input, keep business logic out of templates, and reuse markup through components.
Who it's for
Laravel developers building new features, refactoring legacy code, or reviewing Laravel code quality who want idiomatic, production-grade solutions following Laravel-native conventions rather than framework-agnostic PHP patterns.
FAQ
Common questions
Discussion
Questions & comments ยท 0
Sign In Sign in to leave a comment.