소스 검색

路由修改

moshaorui 3 주 전
부모
커밋
5887cd5575
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/Models/DistProduct.php

+ 1 - 1
app/Models/DistProduct.php

@@ -39,7 +39,7 @@ class DistProduct extends Model
 
     public static function getProductSlug($slug)
     {
-        return self::where('enabled', 1)->where('dist_id', getDistId())->where('slug', $slug)->with('images')->find();
+        return self::where('enabled', 1)->where('dist_id', getDistId())->where('slug', $slug)->with('images')->first();
     }