- Copy the view into your project
- Use the paginate helper by Laravel when collecting data as shown below.
App\YourModel::orderBy('id', 'desc')->with(['relation'])->paginate(15)
- Add the include for the component in your view, and pass the data variable.
@include('components.pagination', ['paginator' => $data])