Display Module 13-05-2026
This commit is contained in:
parent
6a65354f4c
commit
9262132325
41 changed files with 496 additions and 334 deletions
|
|
@ -6,7 +6,6 @@ use App\Enums\DisplayVersionType;
|
|||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class DisplayVersion extends Model
|
||||
|
|
@ -35,10 +34,12 @@ class DisplayVersion extends Model
|
|||
return $this->hasMany(DisplayVersionItem::class)->orderBy('sort_order');
|
||||
}
|
||||
|
||||
public function displays(): BelongsToMany
|
||||
/**
|
||||
* @return HasMany<DisplayPlaylistItem, $this>
|
||||
*/
|
||||
public function playlistItems(): HasMany
|
||||
{
|
||||
return $this->belongsToMany(Display::class, 'display_display_version')
|
||||
->withPivot('sort_order');
|
||||
return $this->hasMany(DisplayPlaylistItem::class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue