[#1] added the credits part
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user