public function getAttribute($key)
    {
        if (array_key_exists($key, $this->attachedFiles)) {
            return $this->attachedFiles[ $key ];
        }

        return parent::getAttribute($key);
    }
public function getAttribute($key)
    {
        if (array_key_exists($key, $this->attachedFiles)) {
            return $this->attachedFiles[ $key ];
        }

        return parent::getAttribute($key);
    }
public function getAttribute ( $ key ) { if ( array_key_exists ( $ key , $ this -> attachedFiles ) ) { return $ this -> attachedFiles [ $ key ] ; } return parent :: getAttribute ( $ key ) ; }
Handle the dynamic retrieval of attachment objects.

@param string $key

@return mixed
Handle the dynamic retrieval of attachment objects .