Spaces:
Running
Running
feat(membership): admin-driven account creation, real estate tier/investment work, in-progress monorepo migration state
b2dcf0f | namespace App\Shared\Validation; | |
| class PaginationValidator | |
| { | |
| public function normalize(array $input): array | |
| { | |
| $page = max(1, (int) ($input['page'] ?? 1)); | |
| $perPage = min(100, max(1, (int) ($input['per_page'] ?? 25))); | |
| return [ | |
| 'page' => $page, | |
| 'per_page' => $perPage, | |
| 'offset' => ($page - 1) * $perPage, | |
| ]; | |
| } | |
| } | |