belongsToMany(MovieCollection::class, 'movies_in_collection', 'movie_id', 'collection_id'); } public function genres() { return $this->belongsToMany(Genre::class, 'movie_genres', 'movie_id', 'genre_id'); } }