[#1] added the credits part

This commit is contained in:
2024-12-30 02:28:58 +02:00
parent 458d09171f
commit 51a6ab6c7a
7 changed files with 272 additions and 2 deletions
+10
View File
@@ -37,4 +37,14 @@ class Movie extends Model
{
return $this->belongsToMany(Genre::class, 'movie_genres', 'movie_id', 'genre_id');
}
public function castList()
{
return $this->belongsToMany(Person::class, 'movie_cast', 'movie_id', 'person_id');
}
public function crewList()
{
return $this->belongsToMany(Person::class, 'movie_crew', 'movie_id', 'person_id');
}
}