Laravel Eloquent Patterns

•
34
•

Optimizes Laravel database interactions using advanced Eloquent ORM patterns for performance and query reuse.

This skill enhances Claude's ability to architect high-performance Laravel applications by enforcing best practices for the Eloquent ORM. It focuses on critical performance optimizations such as N+1 query prevention through eager loading, memory-efficient processing of large datasets using chunks or cursors, and the implementation of reusable query scopes. By integrating strict loading policies and mass assignment security, it ensures your data layer is not only fast but also secure and maintainable, preventing common anti-patterns like business logic leakage into models.

主な機能

01Reusable query scope definition and chaining
02Memory-efficient processing with chunk, lazy, and cursor
03Strict loading violation detection in development
04N+1 query prevention and eager loading enforcement
0534 GitHub stars
06Mass assignment protection and attribute casting

ユースケース

01Standardizing model logic and implementing reusable query filters
02Optimizing slow database queries in existing Laravel applications
03Implementing secure data handling and mass assignment protection