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()
{