소스 검색

feat:helpers添加

igb 4 달 전
부모
커밋
367918baaf
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      app/Helpers/SiteCache.php

+ 5 - 1
app/Helpers/SiteCache.php

@@ -21,9 +21,13 @@ class SiteCache
         }
 
         return Cache::tags([$domain, 'dist'])->remember("dist_{$domain}", $seconds, function () use ($domain) {
-            return DistAdminDistributor::where('custom_domain', $domain)
+            $dist= DistAdminDistributor::where('custom_domain', $domain)
                 ->orWhere('secondary_domain', $domain)
                 ->first();
+            //dd($dist);  // 调试缓存的数据
+            // 序列化存储
+            return serialize($dist);
+
         });
     }