PHP code example of jezzdk / nova-kontainer

1. Go to this page and download the library: Download jezzdk/nova-kontainer 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/ */

    

jezzdk / nova-kontainer example snippets


public function fields()
{
    return [ 
        NovaKontainer::make(__('Image')),
     ];
}

$model->image['url']; // https://myaccount.kontainer.com/cdn/2SP4HV/bm-604549.jpg
$model->image['type']; // 'image'
$model->image['extension']; // 'jpg'
...

public function fields()
{
    return [ 
        NovaKontainer::make(__('Image'))
            ->kontainerUrl('https://my-account.kontainer.com'),
     ];
}

NovaKontainer::make(__('Image'))->onlyImages();
NovaKontainer::make(__('Video'))->onlyVideos();
NovaKontainer::make(__('File'))->onlyFiles();