Skip to content

[3.0.1] Not working with paginate() method #18

@Kladislav

Description

@Kladislav

PHP & Platform

8.0.25, Ubuntu 20.04

Database

PostgreSQL 13

Laravel version

9.37

Have you done this?

  • I have checked my logs and I'm sure is a bug in this package.
  • I can reproduce this bug in isolation (vanilla Laravel install)
  • I can suggest a workaround as a Pull Request

Expectation

The cache scope should also works with paginate()

Description

The paginte() method returns TypeError, but if I change it to simplePaginate method all working fine.

Reproduction

$model = Example::query()->cache()->paginate();

Stack trace & logs

{
 "class": "TypeError",
  "message": "Illuminate\\Database\\Query\\Builder::__construct(): Argument #1 ($connection) must be of type Illuminate\\Database\\ConnectionInterface, Laragear\\CacheQuery\\CacheAwareConnectionProxy given, called in /home/mp/htdocs/backend/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php on line 3482"
}

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions