Skip to content

A self-hosted media server and file management system

chore: remove unused boot methods on models

aminnausin59b2970f13da
diff --git a/app/Models/Category.php b/app/Models/Category.php
index 8ba70364..fade59eb 100755
--- a/app/Models/Category.php
+++ b/app/Models/Category.php
@@ -27,10 +27,10 @@ class Category extends Model {
return $this->belongsTo(User::class);
}
- protected static function boot() {
- parent::boot(); // Automatic withCount
- // static::addGlobalScope('foldersCount', function ($builder) {
- // $builder->withCount('folders');
- // });
- }
+ // protected static function boot() {
+ // parent::boot(); // Automatic withCount
+ // static::addGlobalScope('foldersCount', function ($builder) {
+ // $builder->withCount('folders');
+ // });
+ // }
}
diff --git a/app/Models/Folder.php b/app/Models/Folder.php
index de5da3f7..7b988cff 100755
--- a/app/Models/Folder.php
+++ b/app/Models/Folder.php
@@ -29,10 +29,10 @@ class Folder extends Model {
return $this->videos()->join('metadata', 'videos.id', '=', 'metadata.video_id')->sum('metadata.file_size');
}
- protected static function boot() {
- parent::boot(); // Automatic withCount
- // static::addGlobalScope('videosCount', function ($builder) {
- // $builder->withCount('videos');
- // });
- }
+ // protected static function boot() {
+ // parent::boot(); // Automatic withCount
+ // static::addGlobalScope('videosCount', function ($builder) {
+ // $builder->withCount('videos');
+ // });
+ // }
}
diff --git a/app/Models/SubTask.php b/app/Models/SubTask.php
index 1a1b65f5..4106c6c6 100644
--- a/app/Models/SubTask.php
+++ b/app/Models/SubTask.php
@@ -21,13 +21,13 @@ class SubTask extends Model {
'status' => TaskStatus::class,
];
- protected static function boot() {
- parent::boot();
+ // protected static function boot() {
+ // parent::boot();
- // static::updated(function ($subTask) {
- // $subTask->updateDuration();
- // });
- }
+ // static::updated(function ($subTask) {
+ // $subTask->updateDuration();
+ // });
+ // }
public function updateDuration() {
if (! isset($this->started_at)) {
diff --git a/app/Models/Task.php b/app/Models/Task.php
index 02a993ab..78e68350 100644
--- a/app/Models/Task.php
+++ b/app/Models/Task.php
@@ -28,15 +28,15 @@ class Task extends Model {
];
// Boot method to register model events
- protected static function boot() {
- parent::boot();
-
- // static::updated(function ($task) {
- // // This will run whenever the task is updated
- // // Add your custom logic here
- // $task->updateDuration();
- // });
- }
+ // protected static function boot() {
+ // parent::boot();
+
+ // static::updated(function ($task) {
+ // // This will run whenever the task is updated
+ // // Add your custom logic here
+ // $task->updateDuration();
+ // });
+ // }
// public function updateDuration() {
// if ($this->started_at && $this->ended_at) {