fix carbon
This commit is contained in:
1 parent
3af30b34b5
commit
d0915a611e
12 files changed
+282
-44
No files matched your search
@@ -8,6 +8,7 @@ use App\Filament\Resources\Events\Tables\EventsTable;
|
||||
use App\Filament\Resources\Events\Tables\Tools\LoadPartnerDifferences;
|
||||
use App\Models\Event;
|
||||
use App\Models\EventBookmaker;
|
||||
use Carbon\Carbon;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Tables\Table;
|
||||
@@ -48,7 +49,7 @@ class EventResource extends Resource
|
||||
{
|
||||
return parent::getEloquentQuery()
|
||||
->where('sport_id', auth()->user()->sport_id)
|
||||
->whereDate('starttime', '>', now())
|
||||
->whereDate('starttime', '>=', Carbon::now())
|
||||
->count();
|
||||
}
|
||||
|
||||
@@ -66,9 +67,9 @@ class EventResource extends Resource
|
||||
->where('sport_id', auth()->user()->sport_id);
|
||||
|
||||
if (config('env.app_env') == 'production') {
|
||||
$query->whereDate('starttime', '>=', now()->subHour());
|
||||
$query->whereDate('starttime', '>=', Carbon::now()->subHour());
|
||||
} else {
|
||||
$query->whereDate('starttime', '>=', now());
|
||||
$query->whereDate('starttime', '>=', Carbon::now());
|
||||
}
|
||||
|
||||
if (auth()->user()->all_only_none > 0) {
|
||||
|
||||
Reference in new issue
Block a user