public function ensureNotPreviouslyPaginated(Request $request) { if ($request->isPaginated()) { throw new BadRequestException('You may not request two methods of pagination'); } }