Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Laravel custom encryption for all fields of a table

I am writing an application where all the fields of a table/model must be encrypted with a custom encryption. The custom encrypting and decrypting functions resides in the database which take any text as input and return AES256 encrypted value and vice-a-versa for the decrypting function. One approach is to use the function each and everywhere while saving like encrypt($request->name) and similarly in decrypt($model->name) etc. in the controllers. The table contains large no of fields (around 50). What can be the best approach for this. BTW, I am new to Laravel.

Comments