Skip to content

Latest commit

 

History

History
65 lines (43 loc) · 922 Bytes

6_retrieve-visits-and-stats.md

File metadata and controls

65 lines (43 loc) · 922 Bytes

Retrieve visits and stats

An item visits

All visits of an item

visits($post)->count();

Note: $post is a row of a model, i.e. $post = Post::find(22);

Item's visits by a period

visits($post)->period('day')->count();

A model class visits

All visits of a model type

visits('App\Post')->count();

Visits of a model type in period

visits('App\Post')->period('day')->count();

Countries of visitors

visits($post)->countries();

Referers of visitors

visits($post)->refs();

Operating Systems of visitors

visits($post)->operatingSystems();

Languages of visitors

visits($post)->languages();

Prev: < Increments and decrements

Next: Visits lists >