Update TopicsAPIController.php

This commit is contained in:
2020-09-28 06:37:57 +05:00
parent 53340ad389
commit 5d947e2e25

View File

@@ -34,7 +34,7 @@ class TopicsAPIController extends Controller
return Cache::remember($topic->slug. '_'.$currentPage, 300, function () use ($topic) { return Cache::remember($topic->slug. '_'.$currentPage, 300, function () use ($topic) {
return response()->json([ return response()->json([
'topic' => new TopicResource($topic), 'topic' => new TopicResource($topic),
'articles' => $topic->articles()->with('source')->latest('published_date')->paginate(8) 'articles' => $topic->articles()->with('source')->latest('published_date')->paginate(12)
]); ]);
}); });
} }