Created
January 11, 2018 20:01
-
-
Save deleugpn/900c4444fad875539f9d4b97ec004113 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Models\Concerns; | |
| trait Paginatable | |
| { | |
| /** | |
| * @var int | |
| */ | |
| private $pageSizeLimit = 100; | |
| public function getPerPage() | |
| { | |
| $pageSize = request('page_size', $this->perPage); | |
| return min($pageSize, $this->pageSizeLimit); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment