Max Height

maxHeight

ArgumentTypeRequiredExample

height

string

auto, 200px

The ui.player.max-height property enables you to specify the maximum height for the player on the index page of your Nova resource.

<?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')
                ->maxHeight('160px'),
        ];
    }
}

Last updated