steadfastcollective/nova-api-video

Api.video upload field for Laravel Nova.

v1.0.0 2021-06-28 16:38 UTC

This package is auto-updated.

Last update: 2024-10-29 06:19:04 UTC


README

Latest Version on Packagist Total Downloads

Introduction

Api.video upload field for Laravel Nova. It allows uploading videos (supports large files) to api.video.

Installation

You can install the package via composer:

composer require steadfastcollective/nova-api-video

Usage

use SteadfastCollective\NovaApiVideo;

NovaApiVideo::make('Api Video Id', 'api_video_id')
    ->rules('required')
    ->acceptedTypes('video/*');

Store additional attributes

You can call withAdditionalAttributes() to save additional attributes to the database. These include 'file_name', 'file_type', 'size' and 'video_duration'.

use SteadfastCollective\NovaApiVideo;

NovaApiVideo::make('Api Video Id', 'api_video_id')
    ->rules('required')
    ->acceptedTypes('video/*')
    ->withAdditionalAttributes();

You can also specify which additional attributes you want to save by passing the field names as a parameter.

use SteadfastCollective\NovaApiVideo;

NovaApiVideo::make('Api Video Id', 'api_video_id')
    ->rules('required')
    ->acceptedTypes('video/*')
    ->withAdditionalAttributes('file_name', 'file_type');

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email dev@steadfastcollective.com instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.