收到,目前已修正。github已更新:https://github.com/sdfsky/tipask/commit/915d6fe1d8b89b133e50cf6cacb7bb899d0c4283
相关问题的在:\app\Models下Question.php文件
原
public static function correlations($tagIds, $size = 6) { $questions = self::whereHas('tags', function ($query) use ($tagIds) { $query->whereIn('tag_id', $tagIds); } )->orderBy('created_at', 'DESC')->take($size)->get(); return $questions; }
修改为
public static function correlations($tagIds, $size = 6) { $questions = self::whereHas('tags', function ($query) use ($tagIds) { $query->whereIn('tag_id', $tagIds); } )->where('status','>',0)->orderBy('created_at', 'DESC')->take($size)->get(); return $questions; }
相关文章在\app\Models下Article.php文件
原:
public static function correlations($tagIds,$size=6) { $questions = self::whereHas('tags', function($query) use ($tagIds) { $query->whereIn('tag_id', $tagIds); })->orderBy('created_at','DESC')->take($size)->get(); return $questions; }
改
public static function correlations($tagIds,$size=6) { $questions = self::whereHas('tags', function($query) use ($tagIds) { $query->whereIn('tag_id', $tagIds); })->orderBy('created_at','DESC')->take($size)->get(); return $questions; }
这两个改后问题与文章的相应位置会修复bug。
还有,我申请加群了给通过下