laravel-database-encryption
laravel-database-encryption copied to clipboard
Request for support for relationships when using encrypted columns
Description :
I am currently using the elgiborsolution/laravel-database-encryption package to encrypt certain columns in my database. However, I am running into issues when trying to use relationships (such as hasManyThrough) with encrypted columns. The package is not able to search the related columns as they are encrypted.
I believe it would be extremely useful to have support for relationships when using encrypted columns, as it would make it much easier to work with encrypted data in a Laravel application.
I would greatly appreciate it if the developers could consider adding this feature in a future update to the package.
Additional context:
- Package version : * 1.1.0
- Laravel Version : Laravel Framework 9.46.0
Example :
In the following example, I need to access to 'value' which is encrypted
class Event extends Model {
public function persons() {
return $this->hasManyThrough(Person::class, FieldPerson::class, 'value', 'id', 'id', 'person_id');
}
}
Please let me know if you need any more help or if there is anything else that I can do to assist you.