diff options
| author | Zach DeCook <zachdecook@gmail.com> | 2019-01-17 14:29:52 -0500 |
|---|---|---|
| committer | Zach DeCook <zachdecook@gmail.com> | 2019-01-17 14:29:52 -0500 |
| commit | c7df9d769a2dfbc61aa06b8b094a20d829f44bb8 (patch) | |
| tree | 9c9d9f27cf4ce618b74b6b3ccad76e5ab68dc8fe /laravel/app/Song.php | |
| parent | b4958b4bf1fecbb2bace7dc9664b326841c8067e (diff) | |
| download | prosongsa-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.php | 5 |
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"); + } } |
