News letter subscription added

This commit is contained in:
2020-08-22 19:54:40 +05:00
parent 215c14eb14
commit aac9f030cb
7 changed files with 136 additions and 14 deletions

View File

@@ -29,9 +29,9 @@ class TopicsAPIController extends Controller
*/
public function show(Topic $topic)
{
return [
return response()->json([
'topic' => new TopicResource($topic),
'articles' => $topic->articles()->with('source')->latest('published_date')->paginate(8)
];
]);
}
}