armincms / json

A laravel nova field
MIT License
26 stars 2 forks source link

Doesn't work on encrypted fields #12

Open puzzledmonkey opened 2 years ago

puzzledmonkey commented 2 years ago

Hi, excellent field thanks.

However, with a small update, it works with encrypted fields too:

protected function isJsonCastable($model)
{
    return $model->hasCast($this->name, ['array', 'json', 'object', 'collection', 'encrypted:array', 'encrypted:json', 'encrypted:object', 'encrypted:collection']);
}