We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
$total
2 parents 64b6457 + 43de540 commit 1fe3774Copy full SHA for 1fe3774
src/Traits/Buildable.php
@@ -158,7 +158,8 @@ public function paginate(
158
$perPage = null,
159
$columns = ["*"],
160
$pageName = "page",
161
- $page = null
+ $page = null,
162
+ $total = null
163
) {
164
if (! $this->isCachable()) {
165
return parent::paginate($perPage, $columns, $pageName, $page);
@@ -169,8 +170,18 @@ public function paginate(
169
170
if (is_array($page)) {
171
$page = $this->recursiveImplodeWithKey($page);
172
}
173
+
174
$columns = collect($columns)->toArray();
- $cacheKey = $this->makeCacheKey($columns, null, "-paginate_by_{$perPage}_{$pageName}_{$page}");
175
+ $keyDifferentiator = "-paginate_by_{$perPage}_{$pageName}_{$page}";
176
177
+ if ($total !== null) {
178
+ $total = value($total);
179
+ $keyDifferentiator .= $total !== null
180
+ ? "_{$total}"
181
+ : "";
182
+ }
183
184
+ $cacheKey = $this->makeCacheKey($columns, null, $keyDifferentiator);
185
186
return $this->cachedValue(func_get_args(), $cacheKey);
187
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments