]> _ Git - cubist_cms-back.git/commitdiff
wait #3056
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 30 Sep 2019 13:04:38 +0000 (15:04 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 30 Sep 2019 13:04:38 +0000 (15:04 +0200)
src/app/Magic/Models/CubistMagicAbstractModel.php

index fc5dc45c7ae79eb264af2ff77c3de269234dd02a..74f4ed7ddd48ae37a2a9fbf06fd85ecc8a61bf42 100644 (file)
@@ -145,6 +145,14 @@ class CubistMagicAbstractModel extends Model implements HasMedia
         ];
     }
 
+    public function setSlugAttribute($value)
+    {
+        if ($value === null) {
+            $value = '';
+        }
+        return $this->attributes['slug'] = $value;
+    }
+
     // The slug is created automatically from the "title" field if no slug exists.
     public function getSlugOrTitleAttribute()
     {