浏览代码

路由修改

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();
     }