This commit is contained in:
salam committed 2026-07-12 08:30:58 +02:00
1 parent 558430114a
commit f55430fcef
8 files changed
+217 -3838

No files matched your search

+1
View File
@@ -22,6 +22,7 @@
/vendor /vendor
/supervisor /supervisor
/supervisor/nuh /supervisor/nuh
/storage/zip_sofascore_data
Homestead.json Homestead.json
Homestead.yaml Homestead.yaml
Thumbs.db Thumbs.db
@@ -24,6 +24,8 @@ class Grapper
$active_tournaments = SofaScoreTaskTournament::with('tournament')->where('sofa_score_task_id', $task_id)->where('disabled', false)->get(); $active_tournaments = SofaScoreTaskTournament::with('tournament')->where('sofa_score_task_id', $task_id)->where('disabled', false)->get();
// dd($active_tournaments->toArray());
foreach ($active_tournaments as $tournament) { foreach ($active_tournaments as $tournament) {
if ($debug) { if ($debug) {
@@ -47,6 +49,8 @@ class Grapper
$data = CurlSofa::load($url); $data = CurlSofa::load($url);
dd($data);
Nuh::$options['s'] = 0; Nuh::$options['s'] = 0;
Nuh::$options['r'] = 0; Nuh::$options['r'] = 0;
@@ -55,6 +59,10 @@ class Grapper
foreach ($data['events'] as $event) { foreach ($data['events'] as $event) {
dd($event);
// "hasEventPlayerStatistics" => true
$folder = Sofascore::$grapper_path . $day . '/' . $event['tournament']['slug'] . '/' . $event['slug']; $folder = Sofascore::$grapper_path . $day . '/' . $event['tournament']['slug'] . '/' . $event['slug'];
File::makeDirectory($folder, 0775, true, true); File::makeDirectory($folder, 0775, true, true);
@@ -9,6 +9,7 @@ use App\Models\Sport;
use Filament\Actions\Action; use Filament\Actions\Action;
use Filament\Actions\EditAction; use Filament\Actions\EditAction;
use Filament\Tables\Columns\TextColumn; use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Columns\ToggleColumn;
use Filament\Tables\Table; use Filament\Tables\Table;
class ClientsTable class ClientsTable
@@ -23,17 +24,18 @@ class ClientsTable
TextColumn::make('bookmaker') TextColumn::make('bookmaker')
->wrap() ->wrap()
->badge() ->badge()
->formatStateUsing(fn (string $state): string => Bookmaker::where('id', $state)->pluck('name')->first()), ->formatStateUsing(fn(string $state): string => Bookmaker::where('id', $state)->pluck('name')->first()),
TextColumn::make('provider') TextColumn::make('provider')
->badge() ->badge()
->wrap() ->wrap()
->color('success') ->color('success')
->formatStateUsing(fn (string $state): string => Provider::where('id', $state)->pluck('name')->first()), ->formatStateUsing(fn(string $state): string => Provider::where('id', $state)->pluck('name')->first()),
TextColumn::make('sport') TextColumn::make('sport')
->badge() ->badge()
->wrap() ->wrap()
->color('warning') ->color('warning')
->formatStateUsing(fn (string $state): string => Sport::where('id', $state)->pluck('name')->first()), ->formatStateUsing(fn(string $state): string => Sport::where('id', $state)->pluck('name')->first()),
ToggleColumn::make('is_active')
]) ])
->recordActions([ ->recordActions([
Action::make('Create Settings') Action::make('Create Settings')
+9 -1
View File
@@ -6,5 +6,13 @@ use Illuminate\Database\Eloquent\Model;
class Customer extends Model class Customer extends Model
{ {
// protected $fillable = [
'id',
'name',
'homepage',
'bookmaker',
'provider',
'sport',
'is_active',
];
} }
+14
View File
@@ -0,0 +1,14 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class SofaScoreEventGrapped extends Model
{
protected $fillable = [
'event_id',
'name',
'starttime',
];
}
@@ -18,6 +18,7 @@ return new class extends Migration
$table->string('bookmaker')->nullable(); $table->string('bookmaker')->nullable();
$table->string('provider')->nullable(); $table->string('provider')->nullable();
$table->string('sport')->nullable(); $table->string('sport')->nullable();
$table->boolean('is_active')->default(false);
$table->timestamps(); $table->timestamps();
}); });
} }
@@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('sofa_score_event_grappeds', function (Blueprint $table) {
$table->id();
$table->integer('event_id');
$table->string('name');
$table->dateTime('starttime')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('sofa_score_event_grappeds');
}
};
+149 -3834
View File
File diff suppressed because it is too large. Load diff