What problem does it solve?
This Skill addresses the challenge of poorly defined or inconsistent database models, which can lead to data integrity issues, complex queries, and difficult-to-manage code. It guides the creation of well-structured Eloquent models with proper relationships, attributes, and validation, simplifying database interactions.
Core Features & Use Cases
- Eloquent Relationships: Defines
hasMany, belongsTo, etc., for clear data connections.
- Data Integrity & Validation: Configures model attributes, casts, and validation rules to ensure data consistency.
- Use Case: When creating a new
Product model, use this skill to guide the AI in defining its attributes, setting up a hasMany relationship with an OrderItem model, and configuring casts for JSON fields, ensuring a robust and clear data structure.
Quick Start
Define a new 'Comment' backend model, including its relationships to 'User' and 'Post' models, and configure appropriate attributes.