caddydz / nova-preview-resource
Preview a Laravel Nova resource via a popup on the index view
Installs: 9 238
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 4
Forks: 3
Open Issues: 1
Requires
- php: ^7.4|^8
- laravel/nova: ^4
This package is auto-updated.
Last update: 2024-12-19 16:40:34 UTC
README
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