Files
laraundfelix/app/Domain/Media/MediaRendition.php
LarsandCursor c997eb500c
Deploy Test / test (push) Successful in 2m28s
Deploy Test / deploy (push) Failing after 14s
Leite Vorschaubilder und Filmstufen geschuetzt ab
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-16 09:40:59 +01:00

26 lines
540 B
PHP

<?php
namespace App\Domain\Media;
use Illuminate\Database\Eloquent\Model;
class MediaRendition extends Model
{
protected $fillable = [
'content_element_version_id',
'role',
'label',
'path',
];
public static function masterPath(int $versionId): ?string
{
$path = static::query()
->where('content_element_version_id', $versionId)
->where('role', 'master')
->value('path');
return is_string($path) && $path !== '' ? $path : null;
}
}