Skip to content

Files

Latest commit

 Cannot retrieve latest commit at this time.

History

History
25 lines (21 loc) · 548 Bytes

README.md

File metadata and controls

25 lines (21 loc) · 548 Bytes

Install the package

composer require caddydz/nova-preview-resource

For Laravel Nova 3 and below

composer require caddydz/nova-preview-resource:0.0.2

Use the field on any resource

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