composer require digital-creative/nova-inline-morph-to
The signature is the same as the default MorphTo
field that ships with Nova.
use DigitalCreative\InlineMorphTo\InlineMorphTo;
class Article extends Resource
{
public function fields(Request $request)
{
return [
...
InlineMorphTo::make('Template')->types([
\App\Nova\Video::class,
\App\Nova\Image::class,
\App\Nova\Text::class,
\App\Nova\Gallery::class,
]),
...
];
}
}
The MIT License (MIT). Please see License File for more information.