File tree 2 files changed +3
-1
lines changed 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ private function collection(mixed $resultSet): array
136
136
$ return [$ collection ][$ first ] = $ this ->paginator ->first ();
137
137
$ return [$ collection ][$ last ] = $ this ->paginator ->last ();
138
138
$ return [$ collection ][$ pages ] = $ this ->paginator ->total ();
139
- $ return [$ collection ][$ total ] = intval ($ this ->paginator ->param ('count ' ));
139
+ $ return [$ collection ][$ total ] = intval ($ this ->paginator ->param ('totalCount ' ));
140
140
}
141
141
142
142
if (empty ($ return [$ collection ][$ first ]) && !empty ($ return [$ collection ][$ url ])) {
Original file line number Diff line number Diff line change @@ -85,6 +85,8 @@ public function test_as_json(): void
85
85
86
86
$ obj = json_decode ($ json );
87
87
$ this ->assertIsObject ($ obj );
88
+ $ this ->assertEquals (20 , $ obj ->collection ->count );
89
+ $ this ->assertEquals (60 , $ obj ->collection ->total );
88
90
$ this ->assertEquals ('/ ' , $ obj ->collection ->url );
89
91
$ this ->assertCount (1 , (array ) $ obj ->data );
90
92
}
You can’t perform that action at this time.
0 commit comments