Skip to content

Commit b9e062d

Browse files
authored
feat: respect paginationDisabled property value
Merge pull request #215 from rossity/patch-1
2 parents 36a6883 + 0241129 commit b9e062d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Http/Controllers/BaseController.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,11 +621,15 @@ protected function keyName(): string
621621
*/
622622
protected function shouldPaginate(Request $request, int $paginationLimit): bool
623623
{
624+
if (property_exists($this, 'paginationDisabled')) {
625+
return ! $this->paginationDisabled;
626+
}
627+
624628
if (app()->bound('orion.paginationEnabled')) {
625629
return app()->make('orion.paginationEnabled');
626630
}
627631

628-
return !property_exists($this, 'paginationDisabled');
632+
return true;
629633
}
630634

631635
/**

0 commit comments

Comments
 (0)