Pagination

This commit is contained in:
2020-08-15 02:42:08 +05:00
parent 872b7e774e
commit 24ef8b278b
2 changed files with 3 additions and 2 deletions

View File

@@ -16,7 +16,8 @@ class SourcesController extends Controller
public function show(Source $source)
{
return view('sources.show', [
'source' => $source->load('articles')
'source' => $source,
'articles' => $source->articles()->latest('published_date')->paginate(12)
]);
}
}