What problem does it solve?
This Skill streamlines building multi-language Eloquent models and the corresponding translation infrastructure, eliminating repetitive boilerplate and ensuring consistent localization.
Core Features & Use Cases
- Model scaffolding with translation support: generate a canonical model (for example, Article) using spatie/laravel-translatable.
- Migration & translation tables: create the main table and a translations table with locale-specific fields and constraints.
- Seeders & factories for multilingual data: provide sample data across locales for development and testing.
- Best practices guidance: configuration of the $translatable property, non-translatable columns, and locale-aware queries.
Quick Start
Install Laravel and the spatie/laravel-translatable package, then run the steps in this skill to scaffold a translatable model (e.g., Article) with migrations, seeds, and a translation-ready data structure. Then create additional locales and test queries like getting translations per locale.