Stats
extends CrmClientModel
in package
This class is used to get stats from CRM
Tags
Table of Contents
- $validation : array<string|int, mixed>
- Validation rules
- getBrandStats() : array<string|int, mixed>
- Get brand stats ordered by ascendent days
- getQuestionStats() : array<string|int, mixed>
- Get brand stats ordered by ascendent days
Properties
$validation
Validation rules
protected
static array<string|int, mixed>
$validation
= ['question.id' => 'required|int|min:1', 'start' => 'required|date_format:Y-m-d', 'end' => 'required|date_format:Y-m-d']
Methods
getBrandStats()
Get brand stats ordered by ascendent days
public
static getBrandStats(string $start, string $end) : array<string|int, mixed>
Parameters
- $start : string
-
Une date valide au format Y-m-d .
- $end : string
-
Une date valide au format Y-m-d .
Tags
Return values
array<string|int, mixed> —The stats array by day
getQuestionStats()
Get brand stats ordered by ascendent days
public
static getQuestionStats(Question $question, string $start, string $end) : array<string|int, mixed>
Parameters
- $question : Question
-
Une question CRM possèdant un id réel.
- $start : string
-
Une date valide au format Y-m-d .
- $end : string
-
Une date valide au format Y-m-d .
Tags
Return values
array<string|int, mixed> —The stats array by day