fix update player
This commit is contained in:
1 parent
e3f1e8a8d9
commit
f028a8b2a8
16 files changed
+605
-224
No files matched your search
+2
-7
@@ -8,7 +8,7 @@ use App\Models\StatistikoEvent;
|
||||
use App\Models\StatistikoPlayer;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
class LoadPlayer
|
||||
class LoadPlayerWidgets
|
||||
{
|
||||
public static $last_query = [];
|
||||
|
||||
@@ -29,7 +29,6 @@ class LoadPlayer
|
||||
|
||||
$player_on_field = $filter['player_on_field'] ?? 'all';
|
||||
|
||||
|
||||
$season = $filter['season'];
|
||||
$seasonmode = $filter['seasonmode'];
|
||||
$season = GetSeason::load($season, $seasonmode);
|
||||
@@ -110,7 +109,7 @@ class LoadPlayer
|
||||
|
||||
if (isset($value->event->starttime)) {
|
||||
|
||||
$key = round($value->event->starttime->diffInDays(Carbon::now()));
|
||||
$key = (int) round($value->event->starttime->diffInDays(Carbon::now()));
|
||||
|
||||
switch ($statistic_type) {
|
||||
case 'gls':
|
||||
@@ -140,8 +139,6 @@ class LoadPlayer
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
krsort($tmp);
|
||||
$dataset = [];
|
||||
$labels = [];
|
||||
@@ -153,8 +150,6 @@ class LoadPlayer
|
||||
$avverage = array_sum($dataset) / count($dataset);
|
||||
$dataset2 = array_fill(0, count($dataset), $avverage);
|
||||
|
||||
|
||||
|
||||
$data = [
|
||||
'datasets' => [
|
||||
[
|
||||
Reference in new issue
Block a user