Explorar el Código

测试时同步货主问题

LD hace 5 años
padre
commit
aeef403ed8
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      app/Observers/OwnerObserver.php

+ 3 - 2
app/Observers/OwnerObserver.php

@@ -9,11 +9,12 @@ class OwnerObserver
     /**
      * 监听插入事件
      *
-     * @param  \App\Owner  $owner
+     * @param Owner $owner
      * @return void
      */
     public function created(Owner $owner)
     {
-        app("OwnerService")->syncPush($owner);
+        if(env('APP_ENV')=='production')
+            app("OwnerService")->syncPush($owner);
     }
 }