protected function normalizeAsArray($object) : array
    {
        $wrapper = $this->factory->make($object);

        $value = $wrapper->getEntityAttributes();

        if ($this->asJson) {
            $value = json_encode($value);
        }

        return [$this->relation => $value];
    }
protected function normalizeAsArray($object) : array
    {
        $wrapper = $this->factory->make($object);

        $value = $wrapper->getEntityAttributes();

        if ($this->asJson) {
            $value = json_encode($value);
        }

        return [$this->relation => $value];
    }
protected function normalizeAsArray ( $ object ) : array { $ wrapper = $ this -> factory -> make ( $ object ) ; $ value = $ wrapper -> getEntityAttributes ( ) ; if ( $ this -> asJson ) { $ value = json_encode ( $ value ) ; } return [ $ this -> relation => $ value ] ; }
Normalize object an array containing raw attributes.

@param mixed $object

@return array
Normalize object an array containing raw attributes .