Encrypted casts can use unique model-derived keys

Encrypted casts can use unique model-derived keys

🔥 #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.

We're writing a book, you can get it for free here.