Skip to content

Commit 0241129

Browse files
authored
Update shouldPaginate function in BaseController
updated the function to respect the `paginationDisabled` property and its value if it exists. right now it only checks if it exists.
1 parent fbfdb66 commit 0241129

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)