enhance components, add mailtemplate, add traits for translations, for stats

This commit is contained in:
Ludovic CANDELLIER
2023-02-13 22:52:39 +01:00
parent 7449229ff7
commit 685160ddf5
32 changed files with 891 additions and 277 deletions

View File

@@ -0,0 +1,13 @@
<?php
namespace App\Traits;
trait StatHelpers
{
public static function getLastValue()
{
$item = self::query()->start(now())->end(now()->subSecond())->groupByDay()->get();
return $item ? $item[0]->value : 0;
}
}