Encrypted casts can use unique model-derived keys
- ·
- Telegram
- ·
- Newsletter
🔥 #Laravel Tip:
The default encryption cast for Eloquent models uses the app key, making rotation difficult and allowing anyone with key to decrypt all the DB. To address this, consider creating a custom cast that uses the model to create its own unique key.