Basic Usage
Add a String Column to Your Table
Add a string column to your table. Here's an example of how to do it in a migration file:
class CreateMediaTable extends Migration
{
public function up()
{
Schema::create('media', function (Blueprint $table) {
$table->id();
$table->string('video')->nullable();
$table->timestamps();
});
}
}Add a Disk to config/filesystems.php
In your config/filesystems.php file, add a disk configuration for media as follows:
'disks' => [
'media' => [
'driver' => 'local',
'root' => public_path('uploads/media'),
'url' => env('APP_URL') . 'uploads/media'
]
],Add NovaVideo Field to Your Resource
Here's an example of how to do it:
Enjoy
Last updated