about summary refs log tree commit diff
path: root/laravel/app
diff options
context:
space:
mode:
authorZach DeCook <zachdecook@librem.one>2021-09-30 05:57:09 +0000
committerZach DeCook <zachdecook@librem.one>2021-09-30 05:57:09 +0000
commit2f7b60be74edc021f801a0c7c7cc0ffc2160ca4a (patch)
tree9dce706bb4ea4e36897d52c3982f5852656756d5 /laravel/app
parentf5c28047574a7c8a1d74aaba0f7b21f613f155b6 (diff)
downloadprosongsa-2f7b60be74edc021f801a0c7c7cc0ffc2160ca4a.tar.gz
misc improvements
Diffstat (limited to 'laravel/app')
-rw-r--r--laravel/app/Song.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/laravel/app/Song.php b/laravel/app/Song.php
index f31c7ce..a50a5f0 100644
--- a/laravel/app/Song.php
+++ b/laravel/app/Song.php
@@ -7,7 +7,7 @@ use App\Http\Controllers\SongController;
 
 class Song extends Model
 {
-	public $fillable = ['number', 'title', 'author', 'key', 'text'];
+    public $fillable = ['number', 'title', 'author', 'key', 'text'];
     public function playlists()
     {
         return $this->belongsToMany('App\Playlist');
@@ -43,8 +43,8 @@ class Song extends Model
     public function setTextAttribute($text)
     {
         // Watch out, this saves immediately!
-        if ($text && file_put_contents("public/text/{$this->id}.txt", $text)) {
-            $this->attributes['text'] = null;
+        if ($text) {
+            file_put_contents("public/text/{$this->id}.txt", $text);
         }
     }
     public function getChordsAttribute($txt = null)