mirror of
https://github.com/Kovah/LinkAce.git
synced 2025-04-20 23:11:56 +02:00
Add query parameter to control the number of items returned in paged results (#294)
This commit is contained in:
parent
ef9768a04d
commit
8111c6ecd8
@ -81,6 +81,10 @@ function formatDateTime(Carbon $date, bool $use_relational = false): string
|
||||
*/
|
||||
function getPaginationLimit()
|
||||
{
|
||||
if (request()->has('per_page') && (int)request()->get('per_page') > 0) {
|
||||
return (int)request()->get('per_page');
|
||||
}
|
||||
|
||||
$default = config('linkace.default.pagination');
|
||||
|
||||
if (request()->is('guest/*')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user