I am wanting to encrypt/decrypt an entire model (maybe not the PK) and wondering what approach to take?
I dabbled a little and am encrypting individual columns
Yii::$app->getSecurity()->encryptByPassword();
I’m assuming I could use the model’s beforeSave, is that correct? But which event should I use to decrypt when the update/view views are used?
Any advice?
Thank you for your help!