diff options
| author | Zach DeCook <zachdecook@gmail.com> | 2018-12-28 14:59:54 -0500 |
|---|---|---|
| committer | Zach DeCook <zachdecook@gmail.com> | 2018-12-28 15:00:11 -0500 |
| commit | 47208936ee3c18745bbd9a753a9cc566648a5e17 (patch) | |
| tree | 70a5052a2d2f555a688a69aa41736a861ba93c89 /laravel/app/Song.php | |
| parent | 159ee785e197ba57600649e53edc01bc3c22bcfd (diff) | |
| download | prosongsa-47208936ee3c18745bbd9a753a9cc566648a5e17.tar.gz | |
* Links: Make them better show song name instead of title
Diffstat (limited to 'laravel/app/Song.php')
| -rw-r--r-- | laravel/app/Song.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/laravel/app/Song.php b/laravel/app/Song.php index 0565ff6..ceaae21 100644 --- a/laravel/app/Song.php +++ b/laravel/app/Song.php @@ -11,4 +11,8 @@ class Song extends Model { return $this->belongsToMany('App\Playlist'); } + public function getNameAttribute() + { + return $this->title . ( $this->author ? " ($this->author)" : "" ); + } } |
