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();
}
Results per page
To define how many results should be shown per page on the index, set the
perPage
method: