Skip to content

Commit ded531f

Browse files
author
rickon
committed
fix bug
1 parent a4f3e32 commit ded531f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Http/Controllers/Api/BlogController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ public function recommendArticles(Request $request)
286286
$articles = Cache::remember($cacheKey, $expiresAt, function () use ($validated, $fields) {
287287
return BlogArticle::query()
288288
->where('status', 1) // 只推荐已发布文章
289-
->when($validated['exclude_id'] ?? false, function ($q) use ($validated) {
289+
->when($validated['seo_url_key'] ?? false, function ($q) use ($validated) {
290290
$q->where('seo_url_key', '!=', $validated['seo_url_key']); // 排除当前文章
291291
})
292292
->when($validated['type'] === 'popular', function ($q) {

0 commit comments

Comments
 (0)