orchidsoftware / crud

Simplify the process of building CRUD (Create, Read, Update, Delete) functionality in Laravel using the features of Orchid.
https://orchid.software
MIT License
138 stars 34 forks source link

Resource pagination #11

Closed tabuna closed 3 years ago

tabuna commented 3 years ago

Results per page

To define how many results should be shown per page on the index, set the perPage method:

/**
 * Get the number of models to return per page
 *
 * @return int
 * @throws \Illuminate\Contracts\Container\BindingResolutionException
 */
public static function perPage(): int
{
    return app()->make(static::$model)->getPerPage();
}