//! Pages of query results, with the links that move between them.
//!
//! A list of users or posts soon grows past what one response should hold. A query's `paginate`,
//! `simple_paginate`, or `cursor_paginate` method fetches one page and returns a [`Paginator`],
//! [`SimplePaginator`], or [`CursorPaginator`]. Each paginator knows the URLs of the pages around
//! its own.
//!
//! ```no_run
//! # use laravel::model::model;
//! # #[model] pub struct User { pub id: i64, pub name: String }
//! # async fn example() -> laravel::Result<()> {
//! use laravel::db;
//!
//! let users = User::query().order_by(User::name).paginate(15).await?;
//!
//! let emails = db::table("users")
//! .select(["email"])
//! .order_by("id")
//! .simple_paginate::<String>(50)
//! .await?;
//! # Ok(()) }
//! ```
//!
//! A paginator reads its page number from the current request's `page` query parameter, or its
//! cursor from the `cursor` parameter. It serializes with its items under `data`, beside its page
//! numbers and links. To learn how to render the links and paginate for Inertia, read the
//! [pagination guide](https://github.com/laravel/rust-framework/blob/0.x/docs/pagination.md).
#[cfg(feature = "database")]
#[doc(inline)]
pub use laravel_database::pagination::{CursorPaginator, IntoCursor, Paginate};
#[doc(inline)]
pub use laravel_database::pagination::{Paginator, SimplePaginator, current_page};