lots of progress

This commit is contained in:
2025-02-01 15:31:47 +02:00
parent 1362ceb642
commit 83b90aa7a0
40 changed files with 1046 additions and 44 deletions
+9
View File
@@ -12,4 +12,13 @@ class MediaListItem extends Model
'item_type',
'tmdb_id',
];
public function item()
{
if ($this->item_type == 'movie') {
return $this->hasOne(Movie::class, 'id', 'item_id');
}
return $this->hasOne(Show::class, 'id', 'item_id');
}
}