DEV Community

Discussion on: Automatic Laravel Data Encryption with Eloquent

Collapse
 
siv_casm profile image
Shivam Pandya

What about existing plain text data in database which are there before installing and configuring this package?

Collapse
 
tommyhendrawan profile image
Tommy Hendrawan

You can encrypt the old data with command below

    php artisan encryptable:encryptModel '<Your Model Path>'
Enter fullscreen mode Exit fullscreen mode

eg.

    php artisan encryptable:encryptModel 'App\User'
Enter fullscreen mode Exit fullscreen mode
Collapse
 
siv_casm profile image
Shivam Pandya

Thank you very much. :)

Thread Thread
 
codefinity profile image
Manav Misra

Nice of you to thank the author. Welcome to community! 🤓