Skip to content

Commit

Permalink
Update 7_visits-lists.md
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdullahGhanem authored Dec 3, 2022
1 parent 13381ab commit 8f3d284
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/7_visits-lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ visits('App\Post')->top(10);
visits('App\Post')->low(10);
```

Top or Lowest list ids

## Top/Lowest visited items Ids

```php
visits('App\Post')->topIds(10);
```

```php
visits('App\Post')->lowIds(10);
```



### Filter by model attributes

You can get only some of the top/low models by query where clause. For example if Post model has `shares` & `likes` attributes you can filter the models like this:
Expand Down

0 comments on commit 8f3d284

Please sign in to comment.