PHP code example of elipzis / nova-embed-card

1. Go to this page and download the library: Download elipzis/nova-embed-card library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

elipzis / nova-embed-card example snippets


/**
 * Get the cards that should be displayed on the Nova dashboard.
 *
 * @return array
 */
protected function cards() {
    return [
        //Your other cards...
 
        //A most simple embed
        (new EmbedCard())->url('https://www.youtube.com/embed/WhWc3b3KhnY'),
        
        //A more complex embed of raw <iframe>...</iframe> HTML with header and footer
        (new EmbedCard())->header('Spring')->footer('A Blender Open Movie')->code('<iframe width="560" height="315" src="https://www.youtube.com/embed/WhWc3b3KhnY" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>')
    ];
}