Fixes for encrypted casts

This commit is contained in:
David Bomba 2023-05-16 18:17:11 +10:00
parent 202efc205c
commit 04fa9dde8c
2 changed files with 3 additions and 3 deletions

View File

@ -16,8 +16,8 @@ use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
class EncryptedCast implements CastsAttributes
{
public function get($model, string $key, $value, array $attributes)
{
return ! is_null($value) ? decrypt($value) : null;
{nlog($value);
return !$value ? null : decrypt($value);
}
public function set($model, string $key, $value, array $attributes)

View File

@ -15,7 +15,7 @@ return new class extends Migration
{
Schema::table('companies', function (Illuminate\Database\Schema\Blueprint $table) {
$table->text('e_invoice_certificate')->nullable();
$table->string('e_invoice_certificate_passphrase')->nullable();
$table->text('e_invoice_certificate_passphrase')->nullable();
});
}