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/Http/Controllers/SongController.php6
-rw-r--r--laravel/app/Song.php4
2 files changed, 8 insertions, 2 deletions
diff --git a/laravel/app/Http/Controllers/SongController.php b/laravel/app/Http/Controllers/SongController.php
index a18de7a..669ec3e 100644
--- a/laravel/app/Http/Controllers/SongController.php
+++ b/laravel/app/Http/Controllers/SongController.php
@@ -238,6 +238,10 @@ class SongController extends Controller
         $song->text   = $_POST['text'];//request->text strips whitespace.
         $song->verse  = $request->verse;
         $song->save();
-        return redirect()->route( 'song.show', ['song' => $song, 'playlist' => $request->playlistReturn ] );
+        return redirect()->route( 'song.show', [
+            'song' => $song,
+            'playlist' => $request->playlistReturn,
+            'key' => $request->keyReturn,
+        ] );
     }
 }
diff --git a/laravel/app/Song.php b/laravel/app/Song.php
index 58e2317..a71e997 100644
--- a/laravel/app/Song.php
+++ b/laravel/app/Song.php
@@ -13,7 +13,9 @@ class Song extends Model
     }
     public function getNameAttribute()
     {
-        return $this->title . ( $this->author ? " ($this->author)" : "" );
+        return $this->title
+            . ( $this->author ? " ($this->author)" : "" )
+            . ($this->plain_key ? " ($this->plain_key)" : "");
     }
     public function getPlainKeyAttribute()
     {