From c7df9d769a2dfbc61aa06b8b094a20d829f44bb8 Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Thu, 17 Jan 2019 14:29:52 -0500 Subject: * Suggestions: Offer to transpose into the key of the current song --- laravel/app/Song.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'laravel/app/Song.php') 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"); + } } -- cgit 1.4.1