Laravel Eloquent Performance
Optimizes Laravel database interactions by enforcing eager loading, reusable query scopes, and strict lazy-loading prevention.
This skill empowers Claude to write high-performance Laravel database logic by adhering to industry best practices for Eloquent ORM. It focuses on eliminating N+1 query problems through mandatory eager loading, implementing memory-efficient data processing for large datasets using chunks or cursors, and promoting clean code through reusable query scopes. By integrating strict lazy-loading prevention and secure mass assignment patterns, this skill ensures that your Laravel models are not only fast but also secure and maintainable.
主な機能
01Secure mass assignment configuration and attribute casting
02433 GitHub stars
03Strict lazy-loading enforcement for development environments
04Automated N+1 query prevention using eager loading patterns
05Reusable query scope implementation for modular logic
06Memory-efficient processing of large datasets via chunking and cursors
ユースケース
01Defining new Eloquent models with proper security and relationship configurations
02Refactoring slow Laravel controllers to optimize database query performance
03Scaling data processing tasks to handle millions of records without memory exhaustion