add pagination for reports

This commit is contained in:
Pig Fang 2020-03-30 09:38:05 +08:00
parent 33dbb9a3da
commit 9e87f42dd9
2 changed files with 6 additions and 1 deletions

View File

@ -58,7 +58,7 @@ class ReportController extends Controller
{
$reports = Report::where('reporter', auth()->id())
->orderBy('report_at', 'desc')
->get();
->paginate(10);
return view('user.report', ['reports' => $reports]);
}

View File

@ -31,5 +31,10 @@
</tbody>
</table>
</div>
<div class="card-footer">
<div class="float-right">
{{ reports.links()|raw }}
</div>
</div>
</div>
{% endblock %}