app\models\Song::getArtistAttribute PHP Метод

getArtistAttribute() публичный Метод

If it's part of a compilation, that would be the contributing artist. Otherwise, it's the album artist.
public getArtistAttribute ( ) : Artist
Результат Artist
    public function getArtistAttribute()
    {
        return $this->contributing_artist_id ? $this->contributingArtist : $this->album->artist;
    }