浏览代码

Update AvatarPipeline

Daniel Supernault 6 年之前
父节点
当前提交
7316ee38c4
共有 2 个文件被更改,包括 14 次插入0 次删除
  1. 7 0
      app/Jobs/AvatarPipeline/AvatarOptimize.php
  2. 7 0
      app/Jobs/AvatarPipeline/CreateAvatar.php

+ 7 - 0
app/Jobs/AvatarPipeline/AvatarOptimize.php

@@ -19,6 +19,13 @@ class AvatarOptimize implements ShouldQueue
     protected $profile;
     protected $current;
 
+    /**
+     * Delete the job if its models no longer exist.
+     *
+     * @var bool
+     */
+    public $deleteWhenMissingModels = true;
+
     /**
      * Create a new job instance.
      *

+ 7 - 0
app/Jobs/AvatarPipeline/CreateAvatar.php

@@ -20,6 +20,13 @@ class CreateAvatar implements ShouldQueue
 
     protected $profile;
 
+    /**
+     * Delete the job if its models no longer exist.
+     *
+     * @var bool
+     */
+    public $deleteWhenMissingModels = true;
+    
     /**
      * Create a new job instance.
      *