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

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

        return parent::getAttribute($key);
    }
public function getAttribute ( $ key ) { if ( array_key_exists ( $ key , $ this -> getMediaFiles ( ) ) ) { return $ this -> media_files [ $ key ] ; } return parent :: getAttribute ( $ key ) ; }
Handle the dynamic retrieval of media items.

@param string $key

@return mixed
Handle the dynamic retrieval of media items .