https://github.com/krato/novaembed
Embed field for laravel nova
https://github.com/krato/novaembed
embed field laravel nova
Last synced: about 1 year ago
JSON representation
Embed field for laravel nova
- Host: GitHub
- URL: https://github.com/krato/novaembed
- Owner: Krato
- License: mit
- Created: 2019-03-04T09:08:32.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-03-04T10:09:22.000Z (over 4 years ago)
- Last Synced: 2025-03-17T22:08:00.318Z (about 1 year ago)
- Topics: embed, field, laravel, nova
- Language: Vue
- Size: 45.9 KB
- Stars: 12
- Watchers: 3
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Nova Embed
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](https://github.com/oscarotero/Embed) to get the data.


## Installation
You can install the package in to a Laravel app that uses [Nova](https://nova.laravel.com) via composer:
```bash
composer require ericlagarda/nova-embed
```
Then, register your new field in the `fields` method of the `Resource` class.
```php
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
