Leite Vorschaubilder und Filmstufen geschuetzt ab
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
d6ff881e4e
commit
c997eb500c
32 files changed
+979
-68
No files matched your search
@@ -0,0 +1,25 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user