src/JSON.php
public function resolveForDisplay($resource, $attribute = null)
    {
        $attribute = $attribute ?? $this->attribute;

        $value = $resource->{$attribute};

        $this->value = is_object($value) || is_array($value) ? $value : json_decode($value);

        $this->fields->whereInstanceOf(Resolvable::class)->each->resolveForDisplay($this->value);

        parent::resolve($resource, $attribute);
    }
public function resolveForDisplay($resource, $attribute = null)
    {
        $attribute = $attribute ?? $this->attribute;

        $value = $resource->{$attribute};

        $this->value = is_object($value) || is_array($value) ? $value : json_decode($value);

        $this->fields->whereInstanceOf(Resolvable::class)->each->resolveForDisplay($this->value);

        parent::resolve($resource, $attribute);
    }
public function resolveForDisplay ( $ resource , $ attribute = null ) { $ attribute = $ attribute ?? $ this -> attribute ; $ value = $ resource -> { $ attribute } ; $ this -> value = is_object ( $ value ) || is_array ( $ value ) ? $ value : json_decode ( $ value ) ; $ this -> fields -> whereInstanceOf ( Resolvable :: class ) -> each -> resolveForDisplay ( $ this -> value ) ; parent :: resolve ( $ resource , $ attribute ) ; }
Resolve the field's value for display.

@param  mixed  $resource
@param  string|null  $attribute
@return void
Resolve the field s value for display .