Skip to content

Commit 88de5ad

Browse files
authored
Update crud-operation-list-entries.md
1 parent d1e0576 commit 88de5ad

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

5.x/crud-operation-list-entries.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,24 @@ To use ```persistent_table``` you can:
194194

195195
> You can configure the persistent table duration in ``` config/backpack/crud.php ``` under `operations > list > persistentTableDuration`. False is forever. Set any amount of time you want in minutes. Note: you can configure it's expiring time on a per-crud basis using `$this->crud->setOperationSetting('persistentTableDuration', 120); in your setupListOperation()` for 2 hours persistency. The default is `false` which means forever.
196196
197+
<a name="large-tables"></a>
198+
#### Large Tables (millions of entries)
199+
200+
By default, ListEntries uses a few features that are not appropriate for Eloquent models with millions (or billions) of records:
201+
- it shows the total number of entries (which can be a very slow query for big tables);
202+
- it paginates using 1/2/3 page buttons, instead of just previous & next;
203+
204+
Starting with Backpack v5.4 we have an easy way to disable both of those, in order to make the ListOperation super-fast on big database tables. You just need to do:
205+
206+
```php
207+
protected function setupListOperation()
208+
{
209+
// ...
210+
CRUD::setOperationSetting('showEntryCount', false);
211+
// ...
212+
}
213+
```
214+
197215
<a name="how-to-overwrite"></a>
198216
## How to Overwrite
199217

0 commit comments

Comments
 (0)