Add Encryption for Model attributes #818
Replies: 2 comments 2 replies
-
Hey @alexanderkraemer For now, I think:
Thanks |
Beta Was this translation helpful? Give feedback.
-
Hi @alexanderkraemer , Bad news: Backpack doesn't concern itself with how you store things in the database and encrypting. It's out of scope for us to do that. Good news: Laravel DOES concern itself with that. And makes it dead-simple for you to have an attribute encrypted in the database. It's as easy as casting it to protected $casts = [
'type' => ChannelType::class,
'color' => Color::class,
'credentials' => 'encrypted:array',
]; That's everything that's needed 😉 Dead-simple. Laravel spoils us, really 😅 Take a look at the Laravel encrypted docs for more info. Hope it helps. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Extending the Models to allow single properties to be stored encrypted in the database would be a huge plus.
Maybe I've overseen it, and it's already there, but it should not be a big change.
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions