about summary refs log tree commit diff
path: root/laravel/app/Song.php
diff options
context:
space:
mode:
authorZach DeCook <zachdecook@gmail.com>2019-01-17 14:29:52 -0500
committerZach DeCook <zachdecook@gmail.com>2019-01-17 14:29:52 -0500
commitc7df9d769a2dfbc61aa06b8b094a20d829f44bb8 (patch)
tree9c9d9f27cf4ce618b74b6b3ccad76e5ab68dc8fe /laravel/app/Song.php
parentb4958b4bf1fecbb2bace7dc9664b326841c8067e (diff)
downloadprosongsa-c7df9d769a2dfbc61aa06b8b094a20d829f44bb8.tar.gz
* Suggestions: Offer to transpose into the key of the current song
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");
+    }
 }