Courses

Eloquent: The Expert Level (Laravel 9)

Model $casts: Dates, Enum and More

Previous: Customize Model Default Template with Stubs
avatar

Array casting does not work for the postgres database. is it possible to check and share the possible solution? thank you

avatar

Unfortunately I don't think there's a possible solution if postgres just doesn't support it.

avatar

okay thank you

avatar
You can use Markdown
avatar

Very interesting tip about the Enum-casting! Especially since there isn't that much in the documentation about this yet.

👍 2
avatar
You can use Markdown
avatar

Hey, Can we do encryption while storing into and database and decrypt while showing the data to frontend.

avatar

With newer Laravel version, the encryption came as casts. But it's a ONE-WAY encryption, without decryption.

avatar

Can you suggest me some encryption and decription package for this senario. As we all are dealing with larage user data there might be chances of the datbase hacke and data leak.

avatar

Yes, but from the other hand, if you want to encrypt/decrypt data on every query, it would MASSIVELY slow down the application. Do you really want that?

avatar

Can you point me in the right direction with some article link or video, to understand the Best practices.

avatar

Encryption in general is a huge topic, not sure which articles or videos I can point you to. In my experience, I've never used real database encryption except for fields like passwords, because I never cared about data security more than performance, and data security comes from the fact that the server itself is protectec enough.

But if you have other opinion, you may start any bigger tutorial/course on database encryption.

avatar
You can use Markdown
avatar
You can use Markdown