PHP code example of caddydz / nova-preview-resource

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

    

caddydz / nova-preview-resource example snippets


use Caddydz\NovaPreviewResource\NovaPreviewResource;

NovaPreviewResource::make(__('Preview'))
	->image($this->avatar) // Optional
	->width(150) // Optional (in pixels)
	->options([
		__('Key') => $this->value,
		__('Foo') => $this->bar,
		__('Bar') => $this->baz,
	])
	->noValueText('No options available'), // Optional