add prune StatisticFixtures
This commit is contained in:
1 parent
59f2eeec11
commit
269210f596
3 files changed
+25
-11
No files matched your search
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Database\Eloquent\Prunable;
|
use Illuminate\Database\Eloquent\Prunable;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
@@ -36,9 +35,9 @@ class Event extends Model
|
|||||||
/**
|
/**
|
||||||
* Get the prunable model query.
|
* 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()
|
public function provider()
|
||||||
|
|||||||
@@ -3,9 +3,12 @@
|
|||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Prunable;
|
||||||
|
use Illuminate\Support\Carbon;
|
||||||
|
|
||||||
class StatisticFixtures extends Model
|
class StatisticFixtures extends Model
|
||||||
{
|
{
|
||||||
|
use Prunable;
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'sport_id',
|
'sport_id',
|
||||||
'league_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()
|
public function sport()
|
||||||
{
|
{
|
||||||
|
|||||||
Generated
+12
-8
@@ -4705,24 +4705,24 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "mongodb/mongodb",
|
"name": "mongodb/mongodb",
|
||||||
"version": "2.3.0",
|
"version": "2.2.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/mongodb/mongo-php-library",
|
"url": "https://github.com/mongodb/mongo-php-library.git",
|
||||||
"reference": "12e56461166d915e3dd8e4969ad0940ed5207d88"
|
"reference": "bbb13f969e37e047fd822527543df55fdc1c9298"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/12e56461166d915e3dd8e4969ad0940ed5207d88",
|
"url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/bbb13f969e37e047fd822527543df55fdc1c9298",
|
||||||
"reference": "12e56461166d915e3dd8e4969ad0940ed5207d88",
|
"reference": "bbb13f969e37e047fd822527543df55fdc1c9298",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"composer-runtime-api": "^2.0",
|
"composer-runtime-api": "^2.0",
|
||||||
"ext-mongodb": "^2.3",
|
"ext-mongodb": "^2.2",
|
||||||
"php": "^8.1",
|
"php": "^8.1",
|
||||||
"psr/log": "^1.1.4|^2|^3",
|
"psr/log": "^1.1.4|^2|^3",
|
||||||
"symfony/polyfill-php85": "^1.33"
|
"symfony/polyfill-php85": "^1.32"
|
||||||
},
|
},
|
||||||
"replace": {
|
"replace": {
|
||||||
"mongodb/builder": "*"
|
"mongodb/builder": "*"
|
||||||
@@ -4774,7 +4774,11 @@
|
|||||||
"mongodb",
|
"mongodb",
|
||||||
"persistence"
|
"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",
|
"name": "monolog/monolog",
|
||||||
|
|||||||
Reference in new issue
Block a user