protected function fillOnce()
    {
        $payload = $this->payload();

        if (is_array($payload)) {
            return $this->fillAttributes($payload);
        }

        if ($payload instanceof Arrayable) {
            return $this->fillAttributes($payload->toArray());
        }

        if ($payload instanceof \Traversable) {
            return $this->fillAttributes(iterator_to_array($payload));
        }

        if ($payload instanceof \stdClass) {
            return $this->fillAttributes(json_decode(json_encode($payload), true));
        }

        return $this->fillAttributes([]);
    }
protected function fillOnce()
    {
        $payload = $this->payload();

        if (is_array($payload)) {
            return $this->fillAttributes($payload);
        }

        if ($payload instanceof Arrayable) {
            return $this->fillAttributes($payload->toArray());
        }

        if ($payload instanceof \Traversable) {
            return $this->fillAttributes(iterator_to_array($payload));
        }

        if ($payload instanceof \stdClass) {
            return $this->fillAttributes(json_decode(json_encode($payload), true));
        }

        return $this->fillAttributes([]);
    }
protected function fillOnce ( ) { $ payload = $ this -> payload ( ) ; if ( is_array ( $ payload ) ) { return $ this -> fillAttributes ( $ payload ) ; } if ( $ payload instanceof Arrayable ) { return $ this -> fillAttributes ( $ payload -> toArray ( ) ) ; } if ( $ payload instanceof \ Traversable ) { return $ this -> fillAttributes ( iterator_to_array ( $ payload ) ) ; } if ( $ payload instanceof \ stdClass ) { return $ this -> fillAttributes ( json_decode ( json_encode ( $ payload ) , true ) ) ; } return $ this -> fillAttributes ( [ ] ) ; }
Fills the array when accessing it.
Fills the array when accessing it .