Model Casts Generator
Generate the $casts array for Laravel models with various data types.
Model Configuration
Cast Attributes
Generated Code
Usage: Add this property to your Eloquent model class.
Features
- Generate $casts array for Laravel models
- Support for all Laravel cast types
- Encrypted casts for sensitive data
- Array, collection, and object casts
- Date and datetime casting
How to Use
- Enter your model name (optional)
- Add attributes you want to cast
- Select the appropriate cast type for each
- Click "Generate Casts Array"
- Copy and paste into your model class
- Laravel will automatically cast these attributes