app\models\Artist::getContributedSongs PHP 메소드

getContributedSongs() 공개 메소드

Get songs *contributed* (in compilation albums) by the artist.
public getContributedSongs ( ) : Illuminate\Database\Eloquent\Collection
리턴 Illuminate\Database\Eloquent\Collection
    public function getContributedSongs()
    {
        return Song::whereContributingArtistId($this->id)->get();
    }

Usage Example

예제 #1
0
파일: Download.php 프로젝트: phanan/koel
 protected function fromArtist(Artist $artist)
 {
     // Don't forget the contributed songs.
     $songs = $artist->songs->merge($artist->getContributedSongs());
     return $this->fromMultipleSongs($songs);
 }