<?php
namespace App\Nova;
use Illuminate\Http\Request;
use Laravel\Nova\Fields\ID;
use Mostafaznv\NovaVideo\Enums\NovaVideoPlayerDirection;
use Mostafaznv\NovaVideo\Video;
use App\Models\Media as MediaModel;
class Media extends Resource
{
public static string $model = MediaModel::class;
public function fields(Request $request): array
{
return [
ID::make()->sortable(),
Video::make(trans('Video'), 'video')
->storeWithLarupload()
->dir(NovaVideoPlayerDirection::LTR),
];
}
}