about summary refs log tree commit diff
path: root/laravel/app
diff options
context:
space:
mode:
Diffstat (limited to 'laravel/app')
-rw-r--r--laravel/app/Song.php4
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)" : "" );
+    }
 }