]> BookStack Code Mirror - bookstack/blobdiff - app/Activity/Models/Watch.php
Notifications: Linked watch functionality to UI
[bookstack] / app / Activity / Models / Watch.php
index 6e0e1f787d3e384754b5aafbb1bc085d1887436e..6637c9655de10e9f9366d7ff8a037e0b48125279 100644 (file)
@@ -18,13 +18,7 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
  */
 class Watch extends Model
 {
-    protected static array $levelByOption = [
-        'default' => -1,
-        'ignore' => 0,
-        'new' => 1,
-        'updates' => 2,
-        'comments' => 3,
-    ];
+    protected $guarded = [];
 
     public function watchable()
     {
@@ -36,17 +30,4 @@ class Watch extends Model
         return $this->hasMany(JointPermission::class, 'entity_id', 'watchable_id')
             ->whereColumn('favourites.watchable_type', '=', 'joint_permissions.entity_type');
     }
-
-    /**
-     * @return string[]
-     */
-    public static function getAvailableOptionNames(): array
-    {
-        return array_keys(static::$levelByOption);
-    }
-
-    public static function optionNameToLevel(string $option): int
-    {
-        return static::$levelByOption[$option] ?? -1;
-    }
 }