ericlagarda/nova-embed

Embed field for Laravel Nova

Installs: 941

Dependents: 0

Suggesters: 0

Security: 0

Stars: 7

Watchers: 1

Forks: 0

Open Issues: 1

Language:Vue

v2.0 2020-05-07 10:02 UTC

This package is auto-updated.

Last update: 2020-06-07 10:07:27 UTC


README

Embed field for Laravel Nova. With this package you can embed from Youtube, Vimeo, Facebook, DailyMotion, SoundCloud, Instagram and a lot of more. Uses Oscarotero Embed to get the data.

preview

preview2

Installation

You can install the package in to a Laravel app that uses Nova via composer:

composer require ericlagarda/nova-embed

Then, register your new field in the fields method of the Resource class.

use EricLagarda\NovaEmbed\Embed;

public function fields()
{
    return [
        // ...
 
        Embed::make('Embed')
                ->ajax(),
    ];
}

Update

Please change your namespace: Ericlagarda to EricLagarda

Field options

  • ->ajax(): Load the embed with ajax. By default loads with the field
  • ->cache(): You can set the time of the cache. By default a month.
  • ->viewInIndex(): Click on the image to open a modal with the embed.

Cache will set a month in minutes for Laravel 5.7 and below, and a month in seconds for Laravel 5.8 and up.

## Screenshots

preview2