about summary refs log tree commit diff
path: root/laravel/app/Song.php
diff options
context:
space:
mode:
Diffstat (limited to 'laravel/app/Song.php')
-rw-r--r--laravel/app/Song.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/laravel/app/Song.php b/laravel/app/Song.php
index ceaae21..58e2317 100644
--- a/laravel/app/Song.php
+++ b/laravel/app/Song.php
@@ -15,4 +15,9 @@ class Song extends Model
     {
         return $this->title . ( $this->author ? " ($this->author)" : "" );
     }
+    public function getPlainKeyAttribute()
+    {
+        // TODO: Validate that this is plain.
+        return trim($this->key, "m");
+    }
 }