StatsDuration
in package
Table of Contents
- $durationType : mixed
- $groupBy : array<string|int, mixed>
- Group by fields
- $query : Builder
- Query builder used for this instance
- $scoreType : mixed
- __construct() : mixed
- after() : self
- After the specified timestamp
- before() : self
- Before the specified timestamp
- between() : self
- Between the specified timestamps
- browserFamilies() : mixed
- browserNames() : mixed
- byId() : self
- Group by loggable id
- byModel() : self
- Group by loggable type
- byScoreType() : self
- Group by score type
- byScoreValues() : self
- Group by score value
- count() : mixed
- Count visits
- day() : self
- For current day
- deviceTypes() : mixed
- frequency() : self
- Set duration frequency for query
- hour() : self
- For current hour
- lastNDurations() : self
- For last N days
- loggable() : self
- Bind loggable with query
- month() : self
- For current month
- platformFamilies() : mixed
- platformNames() : mixed
- query() : mixed
- resetQuery() : mixed
- score() : self
- Records of specific score type
- scoreValues() : Collection
- Public function to return score values
- thisHour() : mixed
- thisMonth() : mixed
- thisWeek() : mixed
- thisYear() : mixed
- today() : mixed
- week() : self
- For current week
- year() : self
- For current year
Properties
$durationType
private
mixed
$durationType
$groupBy
Group by fields
private
array<string|int, mixed>
$groupBy
= []
$query
Query builder used for this instance
private
Builder
$query
$scoreType
private
mixed
$scoreType
Methods
__construct()
public
__construct() : mixed
Return values
mixed —after()
After the specified timestamp
public
after(Carbon|string $start) : self
Parameters
- $start : Carbon|string
Return values
self —before()
Before the specified timestamp
public
before(mixed $end) : self
Parameters
- $end : mixed
Return values
self —between()
Between the specified timestamps
public
between(Carbon|string $start, Carbon|string $end) : self
Parameters
- $start : Carbon|string
- $end : Carbon|string
Return values
self —browserFamilies()
public
browserFamilies() : mixed
Return values
mixed —browserNames()
public
browserNames() : mixed
Return values
mixed —byId()
Group by loggable id
public
byId() : self
Return values
self —byModel()
Group by loggable type
public
byModel() : self
Return values
self —byScoreType()
Group by score type
public
byScoreType() : self
Return values
self —byScoreValues()
Group by score value
public
byScoreValues() : self
Return values
self —count()
Count visits
public
count() : mixed
Return values
mixed —day()
For current day
public
day(mixed $sub) : self
Parameters
- $sub : mixed
Return values
self —deviceTypes()
public
deviceTypes() : mixed
Return values
mixed —frequency()
Set duration frequency for query
public
frequency(DurationFrequency|array<string|int, mixed> $durationFrequency) : self
Parameters
- $durationFrequency : DurationFrequency|array<string|int, mixed>
Return values
self —hour()
For current hour
public
hour(mixed $sub) : self
Parameters
- $sub : mixed
Return values
self —lastNDurations()
For last N days
public
lastNDurations(int $n, DurationFrequency $durationFrequency) : self
Parameters
- $n : int
- $durationFrequency : DurationFrequency
Return values
self —loggable()
Bind loggable with query
public
loggable(string $loggable[, int|null $loggableId = null ]) : self
Parameters
- $loggable : string
- $loggableId : int|null = null
Return values
self —month()
For current month
public
month(mixed $sub) : self
Parameters
- $sub : mixed
Return values
self —platformFamilies()
public
platformFamilies() : mixed
Return values
mixed —platformNames()
public
platformNames() : mixed
Return values
mixed —query()
public
query() : mixed
Return values
mixed —resetQuery()
public
resetQuery() : mixed
Return values
mixed —score()
Records of specific score type
public
score(ScoreType|array<string|int, mixed> $scoreType) : self
Parameters
- $scoreType : ScoreType|array<string|int, mixed>
-
Score type or list of it
Return values
self —scoreValues()
Public function to return score values
public
scoreValues([ScoreType $scoreType = null ]) : Collection
Parameters
- $scoreType : ScoreType = null
Return values
Collection —thisHour()
public
thisHour() : mixed
Return values
mixed —thisMonth()
public
thisMonth() : mixed
Return values
mixed —thisWeek()
public
thisWeek() : mixed
Return values
mixed —thisYear()
public
thisYear() : mixed
Return values
mixed —today()
public
today() : mixed
Return values
mixed —week()
For current week
public
week(mixed $sub) : self
Parameters
- $sub : mixed
Return values
self —year()
For current year
public
year(mixed $sub) : self
Parameters
- $sub : mixed