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

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

Prepare the lyrics for displaying.
public getLyricsAttribute ( $value ) : string
$value
Результат string
    public function getLyricsAttribute($value)
    {
        // We don't use nl2br() here, because the function actually preserves line breaks -
        // it just _appends_ a "<br />" after each of them. This would cause our client
        // implementation of br2nl to fail with duplicated line breaks.
        return str_replace(["\r\n", "\r", "\n"], '<br />', $value);
    }