davidpiesse / nova-audio by davidpiesse

Audio Field for Laravel Nova
154,733
22
2
Package Data
Maintainer Username: davidpiesse
Package Create Date: 2018-08-30
Package Last Update: 2022-12-08
Language: Vue
License: MIT
Last Refreshed: 2024-03-28 03:16:54
Package Statistics
Total Downloads: 154,733
Monthly Downloads: 2,967
Daily Downloads: 116
Total Stars: 22
Total Watchers: 2
Total Forks: 18
Total Open Issues: 26

Audio Field

An audio field for use in Laravel Nova.

Audio Field

For use when you are storing an audio file and want to listen to it from within Nova. It is built on the core File Field field type. See here for more info

Under the hood it uses thabsic HTML5 Audio tag. So MP3, WAV and OGG are supported :)

Installation

composer require davidpiesse/nova-audio

To use the field add it to your Nova Resources file (such as User.php)

use Davidpiesse\Audio\Audio;

public function fields(Request $request)
{
    return [
        ...
        Audio::make('Audio')->disk('public'),
        
        Audio::make('Audio', function() {
            return 'path-to-your-folder-on-s3'.$this->audio_file_name_from_model;
        })->disk('s3')
        ->expires(5),
        ...
    ];
}