add prune StatisticFixtures

This commit is contained in:
salam committed 2026-08-21 13:38:58 +02:00
1 parent 59f2eeec11
commit 269210f596
3 files changed
+25 -11

No files matched your search

+2 -3
View File
@@ -2,7 +2,6 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Prunable;
use Illuminate\Support\Facades\Auth;
@@ -36,9 +35,9 @@ class Event extends Model
/**
* Get the prunable model query.
*/
public function prunable(): Builder
public function prunable()
{
return static::where('starttime', '<', now()->subHour(5));
return static::where('starttime', '<', now()->subHours(5));
}
public function provider()
+11
View File
@@ -3,9 +3,12 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Prunable;
use Illuminate\Support\Carbon;
class StatisticFixtures extends Model
{
use Prunable;
protected $fillable = [
'sport_id',
'league_id',
@@ -23,6 +26,14 @@ class StatisticFixtures extends Model
];
}
/**
* Get the prunable model query.
*/
public function prunable()
{
return static::where('starttime', '<', Carbon::now('Europe/Vienna')->subMinutes(15));
}
public function sport()
{
Generated
+12 -8
View File
@@ -4705,24 +4705,24 @@
},
{
"name": "mongodb/mongodb",
"version": "2.3.0",
"version": "2.2.0",
"source": {
"type": "git",
"url": "https://github.com/mongodb/mongo-php-library",
"reference": "12e56461166d915e3dd8e4969ad0940ed5207d88"
"url": "https://github.com/mongodb/mongo-php-library.git",
"reference": "bbb13f969e37e047fd822527543df55fdc1c9298"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/12e56461166d915e3dd8e4969ad0940ed5207d88",
"reference": "12e56461166d915e3dd8e4969ad0940ed5207d88",
"url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/bbb13f969e37e047fd822527543df55fdc1c9298",
"reference": "bbb13f969e37e047fd822527543df55fdc1c9298",
"shasum": ""
},
"require": {
"composer-runtime-api": "^2.0",
"ext-mongodb": "^2.3",
"ext-mongodb": "^2.2",
"php": "^8.1",
"psr/log": "^1.1.4|^2|^3",
"symfony/polyfill-php85": "^1.33"
"symfony/polyfill-php85": "^1.32"
},
"replace": {
"mongodb/builder": "*"
@@ -4774,7 +4774,11 @@
"mongodb",
"persistence"
],
"time": "2026-04-28T12:50:06+00:00"
"support": {
"issues": "https://github.com/mongodb/mongo-php-library/issues",
"source": "https://github.com/mongodb/mongo-php-library/tree/2.2.0"
},
"time": "2026-02-11T11:39:56+00:00"
},
{
"name": "monolog/monolog",