In this video we are going to learn about Livewire Pagination
So lets see how create pagination in livewire
First of lets create new component.
So switch to the command prompt and just run the command

php artisan make:livewire Users

Now run the application

php artisan serve

Now switch to the project and lets create the route for this component.
So just go inside the routes directory.
And then open web.php file.
Now just add here the route.
Now just open Users.php component class file write the following code.


namespace App\\Http\\Livewire;

use App\\Models\\User;
use Livewire\\Component;
use Livewire\\WithPagination;

class Users extends Component
use WithPagination;
public function render()
$users = User::paginate(5);
return view('livewire.user-component',['users'=>$users]);

Save the file and now open users.blade.php view file.
And here create a table write the following code.

<div class=\"container\">
<div class=\"row\">
<div class=\"col-md-12\">
<div class=\"card\">
<div class=\"card-header\">
All Users
<div class=\"card-body\">
<table class=\"table table-striped\">
    @foreach ($users as $user)

For adding the pagination links after the closing table tag just write the following code.


One more thing add css for pagination.
nav svg{
height: 20px;
All done so lets check this.
So switch to the browser and just go to the url /all-users.
And here you can see the 5 records inside the table and this is pagination link.
So in this way we can create Livewire Pagination so that's all about Livewire Pagination.