Skip to content

Commit

Permalink
Added pagination to the notes page
Browse files Browse the repository at this point in the history
  • Loading branch information
WillTheDeveloper committed Mar 16, 2022
1 parent a4e11b8 commit 2e6f3dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Note.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Note extends Controller
public function show()
{
return view('note', [
'list' => \App\Models\Note::query()->where('notes.user_id', auth()->id())->get('*')
'list' => \App\Models\Note::query()->where('notes.user_id', auth()->id())->paginate(10),
]);
}

Expand Down
1 change: 1 addition & 0 deletions resources/views/note.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ class="order-0 inline-flex items-center px-4 py-2 border border-transparent shad
@endforeach
</tbody>
</table>
{{$list->links()}}
</div>
</div>
</div>
Expand Down

0 comments on commit 2e6f3dd

Please sign in to comment.