From 419148cd18872350b869fb6ba136f8fce326febb Mon Sep 17 00:00:00 2001 From: salam Date: Mon, 1 Dec 2025 07:42:54 +0100 Subject: [PATCH] removed shield use superadmin --- .../Commands/Comparatore/Comparatore.php | 64 --- app/Console/Commands/Grapper/TxOdds/Odds.php | 296 +++++----- app/Console/Commands/Grapper/TxSwitch.php | 8 +- app/Console/Commands/NuhBash.php | 34 +- .../Administrator/AdministratorCluster.php | 12 + .../Bookmakers/BookmakerResource.php | 8 + .../Resources/Clients/ClientResource.php | 8 + .../Resources/Countries/CountryResource.php | 8 + .../Resources/Events/Tables/EventsTable.php | 7 +- .../Resources/Providers/ProviderResource.php | 10 +- .../Resources/Sports/SportResource.php | 8 + .../Supervisors/Schemas/SupervisorForm.php | 34 +- .../Supervisors/SupervisorResource.php | 10 +- .../Supervisors/Tables/SupervisorsTable.php | 32 +- app/Filament/Resources/Users/UserResource.php | 8 + app/Models/Odds2way.php | 10 - app/Models/Odds3way.php | 10 - app/Models/OddsDc.php | 45 ++ app/Models/OddsDnb.php | 11 - app/Models/OddsGgng.php | 45 ++ app/Models/OddsHandicap.php | 11 - app/Models/OddsQualify.php | 10 - app/Models/OddsTotal.php | 11 - app/Models/Supervisor.php | 4 +- app/Models/User.php | 3 +- app/Policies/BookmakerPolicy.php | 70 --- app/Policies/ClientPolicy.php | 70 --- app/Policies/CountryPolicy.php | 70 --- app/Policies/EventPolicy.php | 70 --- app/Policies/ProviderPolicy.php | 70 --- app/Policies/RolePolicy.php | 70 --- app/Policies/SportPolicy.php | 70 --- app/Policies/SupervisorPolicy.php | 70 --- app/Policies/UserPolicy.php | 67 --- app/Providers/AppServiceProvider.php | 2 +- app/Providers/Filament/AdminPanelProvider.php | 5 - bootstrap/cache/config.php | 117 ---- bootstrap/cache/filament/panels/admin.php | 18 +- bootstrap/cache/packages.php | 25 - bootstrap/cache/routes-v7.php | 532 +++++------------- bootstrap/cache/services.php | 130 ++--- composer.json | 1 - composer.lock | 257 +-------- config/filament-shield.php | 261 --------- ...3_08_06_085243_create_supervisor_table.php | 6 +- ...4_11_08_053426_create_odds_3ways_table.php | 4 +- ...4_11_08_053430_create_odds_2ways_table.php | 5 +- ...2024_11_08_053430_create_odds_dc_table.php | 5 +- ...024_11_08_053430_create_odds_dnb_table.php | 5 +- ...24_11_08_053430_create_odds_ggng_table.php | 5 +- ...11_08_053430_create_odds_qualify_table.php | 5 +- ..._08_053439_create_odds_handicaps_table.php | 5 +- ..._11_08_053445_create_odds_totals_table.php | 5 +- ..._08_14_062056_create_permission_tables.php | 134 ----- database/seeders/DatabaseSeeder.php | 2 +- database/seeders/ProvoiderSeeder.php | 12 +- .../seeders/RolesAndPermissionsSeeder.php | 49 -- database/seeders/SupervisorSeeder.php | 6 +- database/seeders/UserSeeder.php | 31 + setup.sh | 13 +- 60 files changed, 611 insertions(+), 2363 deletions(-) delete mode 100644 app/Console/Commands/Comparatore/Comparatore.php create mode 100644 app/Filament/Clusters/Administrator/AdministratorCluster.php create mode 100644 app/Models/OddsDc.php create mode 100644 app/Models/OddsGgng.php delete mode 100644 app/Policies/BookmakerPolicy.php delete mode 100644 app/Policies/ClientPolicy.php delete mode 100644 app/Policies/CountryPolicy.php delete mode 100644 app/Policies/EventPolicy.php delete mode 100644 app/Policies/ProviderPolicy.php delete mode 100644 app/Policies/RolePolicy.php delete mode 100644 app/Policies/SportPolicy.php delete mode 100644 app/Policies/SupervisorPolicy.php delete mode 100644 app/Policies/UserPolicy.php delete mode 100644 config/filament-shield.php delete mode 100644 database/migrations/2025_08_14_062056_create_permission_tables.php delete mode 100644 database/seeders/RolesAndPermissionsSeeder.php create mode 100644 database/seeders/UserSeeder.php diff --git a/app/Console/Commands/Comparatore/Comparatore.php b/app/Console/Commands/Comparatore/Comparatore.php deleted file mode 100644 index 9e94927d..00000000 --- a/app/Console/Commands/Comparatore/Comparatore.php +++ /dev/null @@ -1,64 +0,0 @@ -options(); - self::$options['supervisor_id'] = $this->argument('process'); - self::$options['event_id'] = $this->argument('eventid'); - - if ($this->argument('process') == 'help') { - $txt = PHP_EOL.'a com process [id] eventid [id]'.PHP_EOL; - $txt .= '--d debug'.PHP_EOL; - $txt .= '--f force update market'.PHP_EOL; - $txt .= '--a reload all'.PHP_EOL; - $txt .= '--w reload one week'.PHP_EOL; - $txt .= '--p print feed'.PHP_EOL.PHP_EOL; - $txt .= 'eventid'.PHP_EOL.PHP_EOL; - $txt .= 'use "com l" to show options'.PHP_EOL; - Notice::note($txt, 'b', 1); - } elseif ($this->argument('process') == 'l') { - $txt = 'list of comparatore processes'; - $txt .= Supervisor::list('com'); - Notice::note($txt, 'b', 1); - } - - Supervisorctl::start(self::$options); - - $res = Event::where('time', '>', Carbon::now()->toDateTimeString())->get(); - - foreach ($res as $event) { - $bookmaker = EventBookmaker::where('event_id', $event->id)->get(); - if ($bookmaker->count() != null) { - dd($bookmaker); - } - } - - Supervisorctl::end(self::$options); - } -} diff --git a/app/Console/Commands/Grapper/TxOdds/Odds.php b/app/Console/Commands/Grapper/TxOdds/Odds.php index 8826e8f8..97e6660e 100644 --- a/app/Console/Commands/Grapper/TxOdds/Odds.php +++ b/app/Console/Commands/Grapper/TxOdds/Odds.php @@ -6,6 +6,9 @@ use App\Console\Commands\Curl; use App\Console\Commands\Grapper\Helper; use App\Console\Commands\NuhBash; use App\Models\Event; +use App\Models\Odds3way; +use App\Models\OddsQualify; +use App\Models\OddsTotal; use App\Utilities\Notice; use Carbon\Carbon; @@ -135,8 +138,8 @@ class Odds break; case 'group': - $e['group'] = $v['@attributes']['cname']; - $e['gid'] = $v['@attributes']['id']; + $e['liga'] = $v['@attributes']['cname']; + $e['liid'] = $v['@attributes']['id']; $e['cgid'] = $v['@attributes']['cgid']; $e['spid'] = $v['@attributes']['spid']; $e['mgid'] = $v['@attributes']['mgid']; @@ -173,66 +176,139 @@ class Odds switch ($type) { case '@attributes': $bettypeid = (int) $od['ot']; + dd('add to event bookmaker missing'); + // 'book_startime' => $od['@attributes']['starting_time'], $bmoid = $od['bmoid']; break; case 'odds': switch ($bettypeid) { - case '0': - // three way - $e['odds_3ways'][] = [ - 'event_id' => $e['id'], - 'bookmaker_id' => $bkmid, - 'matchpart_id' => 1, - 'sport_id' => 1, - 'bmoid' => $bmoid, - 'start' => $od['@attributes']['starting_time'], - 'h3w' => (float) $od['o1'], - 'd3w' => (float) $od['o2'], - 'a3w' => (float) $od['o3'], - 'margin' => (float) Helper::margin([$od['o1'], $od['o2'], $od['o3']], 1), - 'book_startime' => $od['@attributes']['starting_time'], - 'source_updated_at' => $od['@attributes']['time'], - 'nuh_last_check' => Carbon::now()->toDateTimeString(), - ]; + Odds3way::updateOrCreate( + [ + 'event_id' => $e['id'], + 'bookmaker_id' => $bkmid, + 'sport_id' => NuhBash::$options['sport_id'], + 'bmoid' => $bmoid, + ], + [ + 'start' => $od['@attributes']['starting_time'], + 'h3w' => (float) $od['o1'], + 'd3w' => (float) $od['o2'], + 'a3w' => (float) $od['o3'], + 'margin' => (float) Helper::margin([$od['o1'], $od['o2'], $od['o3']], 1), + 'flag' => 1, + 'check' => 0, + 'source_updated_at' => $od['@attributes']['time'], + 'last_check_at' => Carbon::now()->toDateTimeString(), + ] + ); + break; + + case '1': + Odds2way::updateOrCreate( + [ + 'event_id' => $e['id'], + 'bookmaker_id' => $bkmid, + 'sport_id' => NuhBash::$options['sport_id'], + 'bmoid' => $bmoid, + ], + [ + 'start' => $od['@attributes']['starting_time'], + 'h2w' => (float) $od['o1'], + 'a2w' => (float) $od['o3'], + 'margin' => (float) Helper::margin([$od['o1'], $od['o3']], 1), + 'flag' => 1, + 'check' => 0, + 'source_updated_at' => $od['@attributes']['time'], + 'last_check_at' => Carbon::now()->toDateTimeString(), + ] + ); break; case '4': - // totals - $e['odds_totals'][] = [ - 'event_id' => $e['id'], - 'bookmaker_id' => $bkmid, - 'matchpart_id' => 1, - 'sport_id' => 1, - 'bmoid' => $bmoid, - 'over' => (float) $od['o1'], - 'under' => (float) $od['o2'], - 'spread' => (float) $od['o3'], - 'margin' => (float) Helper::margin([$od['o1'], $od['o2']], 1), - 'flag' => 1, - 'check' => 0, - 'book_startime' => $od['@attributes']['starting_time'], - 'source_updated_at' => $od['@attributes']['time'], - 'nuh_last_check' => Carbon::now()->toDateTimeString(), - ]; + OddsTotal::updateOrCreate( + [ + 'event_id' => $e['id'], + 'bookmaker_id' => $bkmid, + 'sport_id' => NuhBash::$options['sport_id'], + 'bmoid' => $bmoid, + 'spread' => (float) $od['o3'], + ], + [ + 'start' => $od['@attributes']['starting_time'], + 'over' => (float) $od['o1'], + 'under' => (float) $od['o2'], + 'margin' => (float) Helper::margin([$od['o1'], $od['o2'], $od['o3']], 1), + 'flag' => 1, + 'check' => 0, + 'source_updated_at' => $od['@attributes']['time'], + 'last_check_at' => Carbon::now()->toDateTimeString(), + ] + ); break; case '5242880': - // double chance - $e['odds_dc'][] = [ - 'event_id' => $e['id'], - 'bookmaker_id' => $bkmid, - 'matchpart_id' => 1, - 'sport_id' => 1, - 'bmoid' => $bmoid, - 'dc1x' => (float) $od['o1'], - 'dc12' => (float) $od['o2'], - 'dc2x' => (float) $od['o3'], - 'margin' => (float) Helper::margin([$od['o1'], $od['o2'], $od['o3']], 1), - 'book_startime' => $od['@attributes']['starting_time'], - 'source_updated_at' => $od['@attributes']['time'], - 'nuh_last_check' => Carbon::now()->toDateTimeString(), - ]; + OddsDc::updateOrCreate( + [ + 'event_id' => $e['id'], + 'bookmaker_id' => $bkmid, + 'sport_id' => NuhBash::$options['sport_id'], + 'bmoid' => $bmoid, + ], + [ + 'start' => $od['@attributes']['starting_time'], + 'dc1x' => (float) $od['o1'], + 'dc12' => (float) $od['o2'], + 'dc2x' => (float) $od['o3'], + 'margin' => (float) Helper::margin([$od['o1'], $od['o2'], $od['o3']], 1), + 'flag' => 1, + 'check' => 0, + 'source_updated_at' => $od['@attributes']['time'], + 'last_check_at' => Carbon::now()->toDateTimeString(), + ] + ); + break; + + case '11534337': + OddsGgng::updateOrCreate( + [ + 'event_id' => $e['id'], + 'bookmaker_id' => $bkmid, + 'sport_id' => NuhBash::$options['sport_id'], + 'bmoid' => $bmoid, + ], + [ + 'start' => $od['@attributes']['starting_time'], + 'gg' => (float) $od['o1'], + 'ng' => (float) $od['o3'], + 'margin' => (float) Helper::margin([$od['o1'], $od['o3']], 1), + 'flag' => 1, + 'check' => 0, + 'source_updated_at' => $od['@attributes']['time'], + 'last_check_at' => Carbon::now()->toDateTimeString(), + ] + ); + break; + + case '11534337': + OddsQualify::updateOrCreate( + [ + 'event_id' => $e['id'], + 'bookmaker_id' => $bkmid, + 'sport_id' => NuhBash::$options['sport_id'], + 'bmoid' => $bmoid, + ], + [ + 'start' => $od['@attributes']['starting_time'], + 'htq' => (float) $od['o1'], + 'atq' => (float) $od['o2'], + 'margin' => (float) Helper::margin([$od['o1'], $od['o3']], 1), + 'flag' => 1, + 'check' => 0, + 'source_updated_at' => $od['@attributes']['time'], + 'last_check_at' => Carbon::now()->toDateTimeString(), + ] + ); break; } @@ -247,124 +323,6 @@ class Odds break; } } - - dd($e); - - // if (NuhBash::$options['d']) { - // Notice::note((int) $row['id'].' : '.$row->hteam.' - '.$row->ateam, 'b', 1); - // } - // dd($data); - - // if (NuhBash::$options['p']) { - // Notice::note($url); - // foreach ($xml->match as $match) { - // print_r($match); - // } - // exit; - // } - - // foreach ($xml->match as $m) { - - // if (NuhBash::$options['d']) { - // Notice::note((int) $m['id'].' : '.$m->hteam.' - '.$m->ateam); - // } - - // $evid = Event::where('txid', (int) $m['id'])->pluck('id')->first(); - - // if ($evid) { - // $fixed_array = []; - // $fixed_array['event_id'] = $evid; - - // Event::where('id', $evid)->update(['cnt_bkm_tx' => count($m->bookmaker)]); - - // foreach ($m->bookmaker as $bookmaker) { - - // $fixed_array['bkid'] = (int) $bookmaker['bid']; - - // $value_array = []; - - // foreach ($bookmaker->offer as $offer) { - // switch ($offer['ot']) { - // case '0': - - // $value_array['f3w'] = (int) $offer['flags'] ?? 0; - // $value_array['boid'] = (string) $offer['bmoid'] ?? 0; - // $value_array['time'] = Carbon::parse($offer->odds['starting_time'])->toDateTimeString(); - - // $tmp = []; - // $tmp['h3w'] = (float) $offer->odds->o1 ?? 1; - // $tmp['d3w'] = (float) $offer->odds->o2 ?? 1; - // $tmp['a3w'] = (float) $offer->odds->o3 ?? 1; - // $tmp['m3w'] = Helper::margin($tmp); - // $value_array += $tmp; - // break; - - // case '1': - - // $value_array['f2w'] = (int) $offer['flags'] ?? 0; - // $value_array['boid'] = (string) $offer['bmoid'] ?? 0; - // $value_array['time'] = Carbon::parse($offer->odds['starting_time'])->toDateTimeString(); - - // $tmp = []; - // $tmp['h2w'] = (float) $offer->odds->o1 ?? 1; - // $tmp['a2w'] = (float) $offer->odds->o3 ?? 1; - // $tmp['m2w'] = Helper::margin($tmp); - // $value_array += $tmp; - // break; - - // case '4': - // $hc = (float) $offer->odds->o3; - // if (NuhBash::$options['sport_id'] == 1 && $hc == 2.5) { - // $tmp = []; - // $tmp['ov'] = (float) $offer->odds->o1 ?? 1; - // $tmp['un'] = (float) $offer->odds->o2 ?? 1; - // $tmp['mto'] = Helper::margin($tmp); - // $tmp['fto'] = (int) $offer->odd['flags'] ?? 0; - // $tmp['hc'] = 2.5; - // $value_array += $tmp; - // } - // break; - - // case '5242880': - // // Double Chance (dc1x,dc12,dcx2) - // $value_array['fdc'] = (int) $offer['flags'] ?? 0; - // $tmp = []; - // $tmp['dc1x'] = (float) $offer->odds->o1 ?? 1; - // $tmp['dc12'] = (float) $offer->odds->o2 ?? 1; - // $tmp['dcx2'] = (float) $offer->odds->o3 ?? 1; - // $tmp['mdc'] = Helper::margin($tmp); - // $value_array += $tmp; - // break; - - // case '11534337': - // // goal/nogoal (gg,ng) - // $value_array['fgg'] = (int) $offer['flags'] ?? 0; - // $tmp = []; - // $tmp['gg'] = (float) $offer->odds->o1 ?? 1; - // $tmp['ng'] = (float) $offer->odds->o3 ?? 1; - // $tmp['mgg'] = Helper::margin($tmp); - // $value_array += $tmp; - // break; - - // case '7340033': - // // to qualify (htq,atq) - // $value_array['ftq'] = (int) $offer['flags'] ?? 0; - // $tmp = []; - // $tmp['htq'] = (float) $offer->odds->o1 ?? 1; - // $tmp['atq'] = (float) $offer->odds->o3 ?? 1; - // $tmp['mtq'] = Helper::margin($tmp); - // $value_array += $tmp; - // break; - // } - // } - - // EventBookmaker::updateOrCreate($fixed_array, $value_array); - // if (NuhBash::$options['d']) { - // Notice::note($fixed_array + $value_array, 'b'); - // } - // } - // } - // } } } } diff --git a/app/Console/Commands/Grapper/TxSwitch.php b/app/Console/Commands/Grapper/TxSwitch.php index e6669625..2f4c88cb 100644 --- a/app/Console/Commands/Grapper/TxSwitch.php +++ b/app/Console/Commands/Grapper/TxSwitch.php @@ -13,11 +13,11 @@ class TxSwitch */ public static function switch() { - switch (NuhBash::$options['id']) { - case 1: + switch (NuhBash::$options['name']) { + case 'Fixtures': Fixtures::grap(); break; - case 2: + case 'Odds': Odds::grap(); break; case 3: @@ -27,7 +27,7 @@ class TxSwitch case 5: break; default: - Note::notice('wrong process id for txodds', 'r', 1); + Note::notice('prosses name does not exist', 'r', 1); break; } } diff --git a/app/Console/Commands/NuhBash.php b/app/Console/Commands/NuhBash.php index 38738331..50baebc6 100644 --- a/app/Console/Commands/NuhBash.php +++ b/app/Console/Commands/NuhBash.php @@ -20,9 +20,9 @@ class NuhBash extends Command public function handle() { self::$options = $this->options(); - self::$options['supervisor_id'] = $this->argument('process'); self::$options['event_id'] = $this->argument('eventid'); + $queries = self::$options['m'] ?? 0; if ($this->argument('process') == 'help') { @@ -59,25 +59,21 @@ class NuhBash extends Command Supervisorctl::start(self::$options); - switch (self::$options['type']) { - case 'Grapper': - switch (self::$options['provider_id']) { - case 1: - TxSwitch::switch(); - case 2: - // betsapi - break; - case 3: - // direct - break; - default: - Note::notice('Provider not defined', 'r', 1); - break; - } - break; + if (! self::$options['is_active']) { + Notice::note('Process disabled', 'r', 1); + } - case 'Comparatore': - // code... + switch (self::$options['provider_id']) { + case 1: + // direct + break; + case 2: + TxSwitch::switch(); + case 3: + // betsapi + break; + default: + Note::notice('Provider not defined', 'r', 1); break; } diff --git a/app/Filament/Clusters/Administrator/AdministratorCluster.php b/app/Filament/Clusters/Administrator/AdministratorCluster.php new file mode 100644 index 00000000..106a1e52 --- /dev/null +++ b/app/Filament/Clusters/Administrator/AdministratorCluster.php @@ -0,0 +1,12 @@ +user()->super_admin == 1; + } + public static function form(Schema $schema): Schema { return BookmakerForm::configure($schema); diff --git a/app/Filament/Resources/Clients/ClientResource.php b/app/Filament/Resources/Clients/ClientResource.php index 7b5f52f9..d6346ea1 100644 --- a/app/Filament/Resources/Clients/ClientResource.php +++ b/app/Filament/Resources/Clients/ClientResource.php @@ -2,6 +2,7 @@ namespace App\Filament\Resources\Clients; +use App\Filament\Clusters\Administrator\AdministratorCluster; use App\Filament\Resources\Clients\Pages\ListClients; use App\Filament\Resources\Clients\Schemas\ClientForm; use App\Filament\Resources\Clients\Tables\ClientsTable; @@ -18,8 +19,15 @@ class ClientResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'lucide-square-user'; + protected static ?string $cluster = AdministratorCluster::class; + protected static string|\UnitEnum|null $navigationGroup = 'User'; + public static function canViewAny(): bool + { + return auth()->user()->super_admin == 1; + } + public static function form(Schema $schema): Schema { return ClientForm::configure($schema); diff --git a/app/Filament/Resources/Countries/CountryResource.php b/app/Filament/Resources/Countries/CountryResource.php index a7b1e2b5..336277ed 100644 --- a/app/Filament/Resources/Countries/CountryResource.php +++ b/app/Filament/Resources/Countries/CountryResource.php @@ -2,6 +2,7 @@ namespace App\Filament\Resources\Countries; +use App\Filament\Clusters\Administrator\AdministratorCluster; use App\Filament\Resources\Countries\Pages\ManageCountries; use App\Models\Country; use Filament\Actions\EditAction; @@ -27,8 +28,15 @@ class CountryResource extends Resource protected static ?string $recordTitleAttribute = 'name'; + protected static ?string $cluster = AdministratorCluster::class; + protected static string|\UnitEnum|null $navigationGroup = 'Administration'; + public static function canViewAny(): bool + { + return auth()->user()->super_admin == 1; + } + public static function form(Schema $schema): Schema { return $schema diff --git a/app/Filament/Resources/Events/Tables/EventsTable.php b/app/Filament/Resources/Events/Tables/EventsTable.php index 6a05d220..328d27d0 100644 --- a/app/Filament/Resources/Events/Tables/EventsTable.php +++ b/app/Filament/Resources/Events/Tables/EventsTable.php @@ -11,22 +11,19 @@ use Filament\Support\Enums\IconSize; use Filament\Tables\Columns\IconColumn; use Filament\Tables\Columns\TextColumn; use Filament\Tables\Table; -use Illuminate\Support\HtmlString; class EventsTable { public static function configure(Table $table): Table { return $table + ->poll('10s') ->columns([ IconColumn::make('sport.icon') ->label('') ->size(IconSize::ExtraLarge) ->icon(fn ($record) => $record->sport->icon) - ->extraAttributes(fn ($record): array => [ - 'x-tooltip.html' => new HtmlString, - 'x-tooltip.raw' => new HtmlString('Betradar: '.$record->betaid_id.'
TxOdds: '.$record->txodds_id), - ]), + ->tooltip(fn ($record) => $record->txodds_id), TextColumn::make('starttime') ->label('Start') ->alignCenter() diff --git a/app/Filament/Resources/Providers/ProviderResource.php b/app/Filament/Resources/Providers/ProviderResource.php index 77eb5a7a..575b7b51 100644 --- a/app/Filament/Resources/Providers/ProviderResource.php +++ b/app/Filament/Resources/Providers/ProviderResource.php @@ -2,6 +2,7 @@ namespace App\Filament\Resources\Providers; +use App\Filament\Clusters\Administrator\AdministratorCluster; use App\Filament\Resources\Providers\Pages\ListProviders; use App\Filament\Resources\Providers\Schemas\ProviderForm; use App\Filament\Resources\Providers\Tables\ProvidersTable; @@ -20,7 +21,14 @@ class ProviderResource extends Resource protected static ?string $recordTitleAttribute = 'name'; - protected static string|\UnitEnum|null $navigationGroup = 'Administration'; + protected static ?string $cluster = AdministratorCluster::class; + + protected static string|\UnitEnum|null $navigationGroup = 'Grapper'; + + public static function canViewAny(): bool + { + return auth()->user()->super_admin == 1; + } public static function form(Schema $schema): Schema { diff --git a/app/Filament/Resources/Sports/SportResource.php b/app/Filament/Resources/Sports/SportResource.php index dcf1ddf8..8857482e 100644 --- a/app/Filament/Resources/Sports/SportResource.php +++ b/app/Filament/Resources/Sports/SportResource.php @@ -2,6 +2,7 @@ namespace App\Filament\Resources\Sports; +use App\Filament\Clusters\Administrator\AdministratorCluster; use App\Filament\Resources\Sports\Pages\ManageSports; use App\Models\Sport; use Filament\Resources\Resource; @@ -23,8 +24,15 @@ class SportResource extends Resource protected static ?string $recordTitleAttribute = 'name'; + protected static ?string $cluster = AdministratorCluster::class; + protected static string|\UnitEnum|null $navigationGroup = 'Administration'; + public static function canViewAny(): bool + { + return auth()->user()->super_admin == 1; + } + public static function form(Schema $schema): Schema { return $schema diff --git a/app/Filament/Resources/Supervisors/Schemas/SupervisorForm.php b/app/Filament/Resources/Supervisors/Schemas/SupervisorForm.php index 850f646f..63324b59 100644 --- a/app/Filament/Resources/Supervisors/Schemas/SupervisorForm.php +++ b/app/Filament/Resources/Supervisors/Schemas/SupervisorForm.php @@ -2,13 +2,10 @@ namespace App\Filament\Resources\Supervisors\Schemas; -use App\Models\Bookmaker; use App\Models\Sport; use Filament\Forms\Components\Select; use Filament\Forms\Components\TextInput; use Filament\Forms\Components\Toggle; -use Filament\Schemas\Components\Fieldset; -use Filament\Schemas\Components\Utilities\Get; use Filament\Schemas\Schema; class SupervisorForm @@ -17,24 +14,10 @@ class SupervisorForm { return $schema ->components([ + Toggle::make('is_cron')->columns(2), TextInput::make('name') ->required() ->columnSpan(2), - Select::make('type') - ->options([ - 'Grapper' => 'Grapper', - 'Comparatore' => 'Comparatore', - ]) - ->default('Grapper') - ->selectablePlaceholder(false), - Select::make('filetype') - ->label('File Type') - ->options([ - 'json' => 'json', - 'xml' => 'xml', - ]) - ->default('json') - ->selectablePlaceholder(false), Select::make('provider_id') ->relationship('provider', 'name') ->required() @@ -42,18 +25,9 @@ class SupervisorForm Select::make('sport_id') ->options(Sport::query()->where('is_active', 1)->pluck('name', 'id')) ->nullable(), - Select::make('bookmaker_id') - ->options(Bookmaker::query()->where('is_active', 1)->pluck('name', 'id')) - ->selectablePlaceholder(true), - Fieldset::make('Supervisor or Cron Toggle') - ->schema([ - Toggle::make('is_cron')->live(), - TextInput::make('sleep') - ->label('Sleep between loops') - ->hidden(fn (Get $get): bool => $get('is_cron')) - ->numeric() - ->default(30), - ])->columnSpan(2), + + TextInput::make('sleep'), + TextInput::make('maxsconds')->label('Seconds till throwing an error'), ]); } } diff --git a/app/Filament/Resources/Supervisors/SupervisorResource.php b/app/Filament/Resources/Supervisors/SupervisorResource.php index cf321096..536f9214 100644 --- a/app/Filament/Resources/Supervisors/SupervisorResource.php +++ b/app/Filament/Resources/Supervisors/SupervisorResource.php @@ -2,6 +2,7 @@ namespace App\Filament\Resources\Supervisors; +use App\Filament\Clusters\Administrator\AdministratorCluster; use App\Filament\Resources\Supervisors\Pages\ListSupervisors; use App\Filament\Resources\Supervisors\Schemas\SupervisorForm; use App\Filament\Resources\Supervisors\Tables\SupervisorsTable; @@ -16,9 +17,16 @@ class SupervisorResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'lucide-sliders-vertical'; + protected static ?string $cluster = AdministratorCluster::class; + protected static ?int $navigationSort = 20; - protected static string|\UnitEnum|null $navigationGroup = 'Administration'; + protected static string|\UnitEnum|null $navigationGroup = 'Grapper'; + + public static function canViewAny(): bool + { + return auth()->user()->super_admin == 1; + } public static function form(Schema $schema): Schema { diff --git a/app/Filament/Resources/Supervisors/Tables/SupervisorsTable.php b/app/Filament/Resources/Supervisors/Tables/SupervisorsTable.php index 11aaa0c6..e318180b 100644 --- a/app/Filament/Resources/Supervisors/Tables/SupervisorsTable.php +++ b/app/Filament/Resources/Supervisors/Tables/SupervisorsTable.php @@ -2,11 +2,9 @@ namespace App\Filament\Resources\Supervisors\Tables; -use App\Models\Bookmaker; use Filament\Actions\BulkActionGroup; use Filament\Actions\DeleteBulkAction; use Filament\Actions\EditAction; -use Filament\Tables\Columns\IconColumn; use Filament\Tables\Columns\TextColumn; use Filament\Tables\Columns\ToggleColumn; use Filament\Tables\Table; @@ -19,35 +17,13 @@ class SupervisorsTable ->columns([ TextColumn::make('id')->badge(), TextColumn::make('name')->searchable(), - TextColumn::make('type')->badge(), - TextColumn::make('provider.name') - ->badge()->color(fn (string $state): string => match ($state) { - 'txodds' => 'danger', - 'bestapi' => 'success', - 'direct' => 'primary', - default => 'warning', - }), + TextColumn::make('provider.name')->badge(), TextColumn::make('sport.name')->label('Sport'), - IconColumn::make('bookmaker_id') - ->label('Book') - ->icon(function ($state): string { - if ($state) { - return 'bkm-'.Bookmaker::where('id', $state)->pluck('icon')->first(); - } - }), TextColumn::make('sleep')->numeric(), - TextColumn::make('runtime'), + TextColumn::make('runtime')->label('Run Time'), + TextColumn::make('maxsconds')->label('Max Time'), TextColumn::make('lastcall'), - IconColumn::make('is_cron')->boolean()->label('Cron')->falseColor('gray'), - TextColumn::make('filetype')->badge()->alignCenter(), - TextColumn::make('created_at') - ->dateTime() - ->sortable() - ->toggleable(isToggledHiddenByDefault: true), - TextColumn::make('updated_at') - ->dateTime() - ->sortable() - ->toggleable(isToggledHiddenByDefault: true), + ToggleColumn::make('is_cron')->label('Cron'), ToggleColumn::make('is_active')->label('On/Off'), ]) ->filters([ diff --git a/app/Filament/Resources/Users/UserResource.php b/app/Filament/Resources/Users/UserResource.php index 42e30bb3..1f58d634 100644 --- a/app/Filament/Resources/Users/UserResource.php +++ b/app/Filament/Resources/Users/UserResource.php @@ -2,6 +2,7 @@ namespace App\Filament\Resources\Users; +use App\Filament\Clusters\Administrator\AdministratorCluster; use App\Filament\Resources\Users\Pages\ListUsers; use App\Filament\Resources\Users\Schemas\UserForm; use App\Filament\Resources\Users\Tables\UsersTable; @@ -20,8 +21,15 @@ class UserResource extends Resource protected static ?string $recordTitleAttribute = 'name'; + protected static ?string $cluster = AdministratorCluster::class; + protected static string|\UnitEnum|null $navigationGroup = 'User'; + public static function canViewAny(): bool + { + return auth()->user()->super_admin == 1; + } + public static function form(Schema $schema): Schema { return UserForm::configure($schema); diff --git a/app/Models/Odds2way.php b/app/Models/Odds2way.php index c9f2c8a4..d5ce98b5 100644 --- a/app/Models/Odds2way.php +++ b/app/Models/Odds2way.php @@ -12,7 +12,6 @@ class Odds2way extends Model 'id', 'event_id', 'sport_id', - 'matchpart_id', 'bookmaker_id', 'provider_id', 'home', @@ -24,10 +23,6 @@ class Odds2way extends Model 'updated_at', ]; - protected $casts = [ - 'matchpart_id' => EnumMatchpart::class, - ]; - public function sport() { return $this->belongsTo(Sport::class); @@ -38,11 +33,6 @@ class Odds2way extends Model return $this->belongsTo(Bookmaker::class); } - public function matchpart() - { - return $this->belongsTo(Matchpart::class); - } - public function event() { return $this->belongsTo(Event::class); diff --git a/app/Models/Odds3way.php b/app/Models/Odds3way.php index 098533ef..6e042606 100644 --- a/app/Models/Odds3way.php +++ b/app/Models/Odds3way.php @@ -12,7 +12,6 @@ class Odds3way extends Model 'id', 'event_id', 'sport_id', - 'matchpart_id', 'bookmaker_id', 'provider_id', 'home', @@ -25,10 +24,6 @@ class Odds3way extends Model 'updated_at', ]; - protected $casts = [ - 'matchpart_id' => EnumMatchpart::class, - ]; - public function sport() { return $this->belongsTo(Sport::class); @@ -39,11 +34,6 @@ class Odds3way extends Model return $this->belongsTo(Bookmaker::class); } - public function matchpart() - { - return $this->belongsTo(Matchpart::class); - } - public function event() { return $this->belongsTo(Event::class); diff --git a/app/Models/OddsDc.php b/app/Models/OddsDc.php new file mode 100644 index 00000000..d10d61ec --- /dev/null +++ b/app/Models/OddsDc.php @@ -0,0 +1,45 @@ +belongsTo(Sport::class); + } + + public function bookmaker() + { + return $this->belongsTo(Bookmaker::class); + } + + public function event() + { + return $this->belongsTo(Event::class); + } + + public function provider() + { + return $this->belongsTo(Provider::class); + } +} diff --git a/app/Models/OddsDnb.php b/app/Models/OddsDnb.php index d6e2e65b..f382b15a 100644 --- a/app/Models/OddsDnb.php +++ b/app/Models/OddsDnb.php @@ -2,7 +2,6 @@ namespace App\Models; -use App\Enums\EnumMatchpart; use Illuminate\Database\Eloquent\Model; class OddsDnb extends Model @@ -13,7 +12,6 @@ class OddsDnb extends Model 'id', 'event_id', 'sport_id', - 'matchpart_id', 'bookmaker_id', 'provider_id', 'dnb1', @@ -25,10 +23,6 @@ class OddsDnb extends Model 'updated_at', ]; - protected $casts = [ - 'matchpart_id' => EnumMatchpart::class, - ]; - public function sport() { return $this->belongsTo(Sport::class); @@ -39,11 +33,6 @@ class OddsDnb extends Model return $this->belongsTo(Bookmaker::class); } - public function matchpart() - { - return $this->belongsTo(Matchpart::class); - } - public function event() { return $this->belongsTo(Event::class); diff --git a/app/Models/OddsGgng.php b/app/Models/OddsGgng.php new file mode 100644 index 00000000..cc68b8c4 --- /dev/null +++ b/app/Models/OddsGgng.php @@ -0,0 +1,45 @@ +belongsTo(Sport::class); + } + + public function bookmaker() + { + return $this->belongsTo(Bookmaker::class); + } + + public function event() + { + return $this->belongsTo(Event::class); + } + + public function provider() + { + return $this->belongsTo(Provider::class); + } +} diff --git a/app/Models/OddsHandicap.php b/app/Models/OddsHandicap.php index c041d201..aef108d5 100644 --- a/app/Models/OddsHandicap.php +++ b/app/Models/OddsHandicap.php @@ -2,7 +2,6 @@ namespace App\Models; -use App\Enums\EnumMatchpart; use Illuminate\Database\Eloquent\Model; class OddsHandicap extends Model @@ -13,7 +12,6 @@ class OddsHandicap extends Model 'id', 'event_id', 'sport_id', - 'matchpart_id', 'bookmaker_id', 'provider_id', 'home', @@ -26,10 +24,6 @@ class OddsHandicap extends Model 'updated_at', ]; - protected $casts = [ - 'matchpart_id' => EnumMatchpart::class, - ]; - public function sport() { return $this->belongsTo(Sport::class); @@ -40,11 +34,6 @@ class OddsHandicap extends Model return $this->belongsTo(Bookmaker::class); } - public function matchpart() - { - return $this->belongsTo(Matchpart::class); - } - public function event() { return $this->belongsTo(Event::class); diff --git a/app/Models/OddsQualify.php b/app/Models/OddsQualify.php index af130261..88cfefd9 100644 --- a/app/Models/OddsQualify.php +++ b/app/Models/OddsQualify.php @@ -10,7 +10,6 @@ class OddsQualify extends Model 'id', 'event_id', 'sport_id', - 'matchpart_id', 'bookmaker_id', 'provider_id', 'htq', @@ -22,10 +21,6 @@ class OddsQualify extends Model 'updated_at', ]; - protected $casts = [ - 'matchpart_id' => EnumMatchpart::class, - ]; - public function sport() { return $this->belongsTo(Sport::class); @@ -36,11 +31,6 @@ class OddsQualify extends Model return $this->belongsTo(Bookmaker::class); } - public function matchpart() - { - return $this->belongsTo(Matchpart::class); - } - public function event() { return $this->belongsTo(Event::class); diff --git a/app/Models/OddsTotal.php b/app/Models/OddsTotal.php index 361124e4..fc7ce6bc 100644 --- a/app/Models/OddsTotal.php +++ b/app/Models/OddsTotal.php @@ -2,7 +2,6 @@ namespace App\Models; -use App\Enums\EnumMatchpart; use Illuminate\Database\Eloquent\Model; class OddsTotal extends Model @@ -13,7 +12,6 @@ class OddsTotal extends Model 'id', 'event_id', 'sport_id', - 'matchpart_id', 'bookmaker_id', 'provider_id', 'over', @@ -26,10 +24,6 @@ class OddsTotal extends Model 'updated_at', ]; - protected $casts = [ - 'matchpart_id' => EnumMatchpart::class, - ]; - public function sport() { return $this->belongsTo(Sport::class); @@ -40,11 +34,6 @@ class OddsTotal extends Model return $this->belongsTo(Bookmaker::class); } - public function matchpart() - { - return $this->belongsTo(Matchpart::class); - } - public function event() { return $this->belongsTo(Event::class); diff --git a/app/Models/Supervisor.php b/app/Models/Supervisor.php index c79bcc87..2ead702e 100644 --- a/app/Models/Supervisor.php +++ b/app/Models/Supervisor.php @@ -8,14 +8,12 @@ class Supervisor extends Model { protected $fillable = [ 'name', - 'type', 'provider_id', 'sport_id', - 'bookmaker_id', 'sleep', 'limit', 'runtime', - 'events', + 'maxsconds', 'lastcall', 'is_cron', 'is_active', diff --git a/app/Models/User.php b/app/Models/User.php index 48bfe877..6999844e 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -13,12 +13,11 @@ use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; -use Spatie\Permission\Traits\HasRoles; class User extends Authenticatable implements FilamentUser, HasAppAuthentication, HasAppAuthenticationRecovery, HasEmailAuthentication, MustVerifyEmail { /** @use HasFactory<\Database\Factories\UserFactory> */ - use HasFactory, HasRoles, Notifiable; + use HasFactory, Notifiable; /** * The attributes that are mass assignable. diff --git a/app/Policies/BookmakerPolicy.php b/app/Policies/BookmakerPolicy.php deleted file mode 100644 index affb3d31..00000000 --- a/app/Policies/BookmakerPolicy.php +++ /dev/null @@ -1,70 +0,0 @@ -can('ViewAny:Bookmaker'); - } - - public function view(AuthUser $authUser, Bookmaker $bookmaker): bool - { - return $authUser->can('View:Bookmaker'); - } - - public function create(AuthUser $authUser): bool - { - return $authUser->can('Create:Bookmaker'); - } - - public function update(AuthUser $authUser, Bookmaker $bookmaker): bool - { - return $authUser->can('Update:Bookmaker'); - } - - public function delete(AuthUser $authUser, Bookmaker $bookmaker): bool - { - return $authUser->can('Delete:Bookmaker'); - } - - public function restore(AuthUser $authUser, Bookmaker $bookmaker): bool - { - return $authUser->can('Restore:Bookmaker'); - } - - public function forceDelete(AuthUser $authUser, Bookmaker $bookmaker): bool - { - return $authUser->can('ForceDelete:Bookmaker'); - } - - public function forceDeleteAny(AuthUser $authUser): bool - { - return $authUser->can('ForceDeleteAny:Bookmaker'); - } - - public function restoreAny(AuthUser $authUser): bool - { - return $authUser->can('RestoreAny:Bookmaker'); - } - - public function replicate(AuthUser $authUser, Bookmaker $bookmaker): bool - { - return $authUser->can('Replicate:Bookmaker'); - } - - public function reorder(AuthUser $authUser): bool - { - return $authUser->can('Reorder:Bookmaker'); - } - -} \ No newline at end of file diff --git a/app/Policies/ClientPolicy.php b/app/Policies/ClientPolicy.php deleted file mode 100644 index 2c4879c9..00000000 --- a/app/Policies/ClientPolicy.php +++ /dev/null @@ -1,70 +0,0 @@ -can('ViewAny:Client'); - } - - public function view(AuthUser $authUser, Client $client): bool - { - return $authUser->can('View:Client'); - } - - public function create(AuthUser $authUser): bool - { - return $authUser->can('Create:Client'); - } - - public function update(AuthUser $authUser, Client $client): bool - { - return $authUser->can('Update:Client'); - } - - public function delete(AuthUser $authUser, Client $client): bool - { - return $authUser->can('Delete:Client'); - } - - public function restore(AuthUser $authUser, Client $client): bool - { - return $authUser->can('Restore:Client'); - } - - public function forceDelete(AuthUser $authUser, Client $client): bool - { - return $authUser->can('ForceDelete:Client'); - } - - public function forceDeleteAny(AuthUser $authUser): bool - { - return $authUser->can('ForceDeleteAny:Client'); - } - - public function restoreAny(AuthUser $authUser): bool - { - return $authUser->can('RestoreAny:Client'); - } - - public function replicate(AuthUser $authUser, Client $client): bool - { - return $authUser->can('Replicate:Client'); - } - - public function reorder(AuthUser $authUser): bool - { - return $authUser->can('Reorder:Client'); - } - -} \ No newline at end of file diff --git a/app/Policies/CountryPolicy.php b/app/Policies/CountryPolicy.php deleted file mode 100644 index d48a280f..00000000 --- a/app/Policies/CountryPolicy.php +++ /dev/null @@ -1,70 +0,0 @@ -can('ViewAny:Country'); - } - - public function view(AuthUser $authUser, Country $country): bool - { - return $authUser->can('View:Country'); - } - - public function create(AuthUser $authUser): bool - { - return $authUser->can('Create:Country'); - } - - public function update(AuthUser $authUser, Country $country): bool - { - return $authUser->can('Update:Country'); - } - - public function delete(AuthUser $authUser, Country $country): bool - { - return $authUser->can('Delete:Country'); - } - - public function restore(AuthUser $authUser, Country $country): bool - { - return $authUser->can('Restore:Country'); - } - - public function forceDelete(AuthUser $authUser, Country $country): bool - { - return $authUser->can('ForceDelete:Country'); - } - - public function forceDeleteAny(AuthUser $authUser): bool - { - return $authUser->can('ForceDeleteAny:Country'); - } - - public function restoreAny(AuthUser $authUser): bool - { - return $authUser->can('RestoreAny:Country'); - } - - public function replicate(AuthUser $authUser, Country $country): bool - { - return $authUser->can('Replicate:Country'); - } - - public function reorder(AuthUser $authUser): bool - { - return $authUser->can('Reorder:Country'); - } - -} \ No newline at end of file diff --git a/app/Policies/EventPolicy.php b/app/Policies/EventPolicy.php deleted file mode 100644 index 1d7e5b2e..00000000 --- a/app/Policies/EventPolicy.php +++ /dev/null @@ -1,70 +0,0 @@ -can('ViewAny:Event'); - } - - public function view(AuthUser $authUser, Event $event): bool - { - return $authUser->can('View:Event'); - } - - public function create(AuthUser $authUser): bool - { - return $authUser->can('Create:Event'); - } - - public function update(AuthUser $authUser, Event $event): bool - { - return $authUser->can('Update:Event'); - } - - public function delete(AuthUser $authUser, Event $event): bool - { - return $authUser->can('Delete:Event'); - } - - public function restore(AuthUser $authUser, Event $event): bool - { - return $authUser->can('Restore:Event'); - } - - public function forceDelete(AuthUser $authUser, Event $event): bool - { - return $authUser->can('ForceDelete:Event'); - } - - public function forceDeleteAny(AuthUser $authUser): bool - { - return $authUser->can('ForceDeleteAny:Event'); - } - - public function restoreAny(AuthUser $authUser): bool - { - return $authUser->can('RestoreAny:Event'); - } - - public function replicate(AuthUser $authUser, Event $event): bool - { - return $authUser->can('Replicate:Event'); - } - - public function reorder(AuthUser $authUser): bool - { - return $authUser->can('Reorder:Event'); - } - -} \ No newline at end of file diff --git a/app/Policies/ProviderPolicy.php b/app/Policies/ProviderPolicy.php deleted file mode 100644 index e4be9cf5..00000000 --- a/app/Policies/ProviderPolicy.php +++ /dev/null @@ -1,70 +0,0 @@ -can('ViewAny:Provider'); - } - - public function view(AuthUser $authUser, Provider $provider): bool - { - return $authUser->can('View:Provider'); - } - - public function create(AuthUser $authUser): bool - { - return $authUser->can('Create:Provider'); - } - - public function update(AuthUser $authUser, Provider $provider): bool - { - return $authUser->can('Update:Provider'); - } - - public function delete(AuthUser $authUser, Provider $provider): bool - { - return $authUser->can('Delete:Provider'); - } - - public function restore(AuthUser $authUser, Provider $provider): bool - { - return $authUser->can('Restore:Provider'); - } - - public function forceDelete(AuthUser $authUser, Provider $provider): bool - { - return $authUser->can('ForceDelete:Provider'); - } - - public function forceDeleteAny(AuthUser $authUser): bool - { - return $authUser->can('ForceDeleteAny:Provider'); - } - - public function restoreAny(AuthUser $authUser): bool - { - return $authUser->can('RestoreAny:Provider'); - } - - public function replicate(AuthUser $authUser, Provider $provider): bool - { - return $authUser->can('Replicate:Provider'); - } - - public function reorder(AuthUser $authUser): bool - { - return $authUser->can('Reorder:Provider'); - } - -} \ No newline at end of file diff --git a/app/Policies/RolePolicy.php b/app/Policies/RolePolicy.php deleted file mode 100644 index a2a3263e..00000000 --- a/app/Policies/RolePolicy.php +++ /dev/null @@ -1,70 +0,0 @@ -can('ViewAny:Role'); - } - - public function view(AuthUser $authUser, Role $role): bool - { - return $authUser->can('View:Role'); - } - - public function create(AuthUser $authUser): bool - { - return $authUser->can('Create:Role'); - } - - public function update(AuthUser $authUser, Role $role): bool - { - return $authUser->can('Update:Role'); - } - - public function delete(AuthUser $authUser, Role $role): bool - { - return $authUser->can('Delete:Role'); - } - - public function restore(AuthUser $authUser, Role $role): bool - { - return $authUser->can('Restore:Role'); - } - - public function forceDelete(AuthUser $authUser, Role $role): bool - { - return $authUser->can('ForceDelete:Role'); - } - - public function forceDeleteAny(AuthUser $authUser): bool - { - return $authUser->can('ForceDeleteAny:Role'); - } - - public function restoreAny(AuthUser $authUser): bool - { - return $authUser->can('RestoreAny:Role'); - } - - public function replicate(AuthUser $authUser, Role $role): bool - { - return $authUser->can('Replicate:Role'); - } - - public function reorder(AuthUser $authUser): bool - { - return $authUser->can('Reorder:Role'); - } - -} \ No newline at end of file diff --git a/app/Policies/SportPolicy.php b/app/Policies/SportPolicy.php deleted file mode 100644 index ee934ef6..00000000 --- a/app/Policies/SportPolicy.php +++ /dev/null @@ -1,70 +0,0 @@ -can('ViewAny:Sport'); - } - - public function view(AuthUser $authUser, Sport $sport): bool - { - return $authUser->can('View:Sport'); - } - - public function create(AuthUser $authUser): bool - { - return $authUser->can('Create:Sport'); - } - - public function update(AuthUser $authUser, Sport $sport): bool - { - return $authUser->can('Update:Sport'); - } - - public function delete(AuthUser $authUser, Sport $sport): bool - { - return $authUser->can('Delete:Sport'); - } - - public function restore(AuthUser $authUser, Sport $sport): bool - { - return $authUser->can('Restore:Sport'); - } - - public function forceDelete(AuthUser $authUser, Sport $sport): bool - { - return $authUser->can('ForceDelete:Sport'); - } - - public function forceDeleteAny(AuthUser $authUser): bool - { - return $authUser->can('ForceDeleteAny:Sport'); - } - - public function restoreAny(AuthUser $authUser): bool - { - return $authUser->can('RestoreAny:Sport'); - } - - public function replicate(AuthUser $authUser, Sport $sport): bool - { - return $authUser->can('Replicate:Sport'); - } - - public function reorder(AuthUser $authUser): bool - { - return $authUser->can('Reorder:Sport'); - } - -} \ No newline at end of file diff --git a/app/Policies/SupervisorPolicy.php b/app/Policies/SupervisorPolicy.php deleted file mode 100644 index 3098563b..00000000 --- a/app/Policies/SupervisorPolicy.php +++ /dev/null @@ -1,70 +0,0 @@ -can('ViewAny:Supervisor'); - } - - public function view(AuthUser $authUser, Supervisor $supervisor): bool - { - return $authUser->can('View:Supervisor'); - } - - public function create(AuthUser $authUser): bool - { - return $authUser->can('Create:Supervisor'); - } - - public function update(AuthUser $authUser, Supervisor $supervisor): bool - { - return $authUser->can('Update:Supervisor'); - } - - public function delete(AuthUser $authUser, Supervisor $supervisor): bool - { - return $authUser->can('Delete:Supervisor'); - } - - public function restore(AuthUser $authUser, Supervisor $supervisor): bool - { - return $authUser->can('Restore:Supervisor'); - } - - public function forceDelete(AuthUser $authUser, Supervisor $supervisor): bool - { - return $authUser->can('ForceDelete:Supervisor'); - } - - public function forceDeleteAny(AuthUser $authUser): bool - { - return $authUser->can('ForceDeleteAny:Supervisor'); - } - - public function restoreAny(AuthUser $authUser): bool - { - return $authUser->can('RestoreAny:Supervisor'); - } - - public function replicate(AuthUser $authUser, Supervisor $supervisor): bool - { - return $authUser->can('Replicate:Supervisor'); - } - - public function reorder(AuthUser $authUser): bool - { - return $authUser->can('Reorder:Supervisor'); - } - -} \ No newline at end of file diff --git a/app/Policies/UserPolicy.php b/app/Policies/UserPolicy.php deleted file mode 100644 index 10cdce3e..00000000 --- a/app/Policies/UserPolicy.php +++ /dev/null @@ -1,67 +0,0 @@ -can('ViewAny:User'); - } - - public function view(AuthUser $authUser): bool - { - return $authUser->can('View:User'); - } - - public function create(AuthUser $authUser): bool - { - return $authUser->can('Create:User'); - } - - public function update(AuthUser $authUser): bool - { - return $authUser->can('Update:User'); - } - - public function delete(AuthUser $authUser): bool - { - return $authUser->can('Delete:User'); - } - - public function restore(AuthUser $authUser): bool - { - return $authUser->can('Restore:User'); - } - - public function forceDelete(AuthUser $authUser): bool - { - return $authUser->can('ForceDelete:User'); - } - - public function forceDeleteAny(AuthUser $authUser): bool - { - return $authUser->can('ForceDeleteAny:User'); - } - - public function restoreAny(AuthUser $authUser): bool - { - return $authUser->can('RestoreAny:User'); - } - - public function replicate(AuthUser $authUser): bool - { - return $authUser->can('Replicate:User'); - } - - public function reorder(AuthUser $authUser): bool - { - return $authUser->can('Reorder:User'); - } - -} \ No newline at end of file diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 8b792997..002d0784 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -27,7 +27,7 @@ class AppServiceProvider extends ServiceProvider FilamentColor::register([ 'danger' => Color::Red, 'gray' => Color::Zinc, - 'primary' => Color::Red, + 'primary' => Color::Blue, 'success' => Color::Green, 'warning' => Color::Yellow, 'info' => Color::Indigo, diff --git a/app/Providers/Filament/AdminPanelProvider.php b/app/Providers/Filament/AdminPanelProvider.php index 9a3ac109..2b30aaaa 100644 --- a/app/Providers/Filament/AdminPanelProvider.php +++ b/app/Providers/Filament/AdminPanelProvider.php @@ -4,7 +4,6 @@ namespace App\Providers\Filament; use Awcodes\LightSwitch\Enums\Alignment; use Awcodes\LightSwitch\LightSwitchPlugin; -use BezhanSalleh\FilamentShield\FilamentShieldPlugin; use Filament\Actions\Action; use Filament\Auth\MultiFactor\App\AppAuthentication; use Filament\Auth\MultiFactor\Email\EmailAuthentication; @@ -92,10 +91,6 @@ class AdminPanelProvider extends PanelProvider ->authMiddleware([ Authenticate::class, ])->plugins([ - FilamentShieldPlugin::make() - ->navigationSort(10) - ->navigationBadge('3') - ->globallySearchable(false), FilamentEditProfilePlugin::make()->shouldRegisterNavigation(false), LightSwitchPlugin::make()->position(Alignment::BottomCenter), FilamentBackgroundsPlugin::make() diff --git a/bootstrap/cache/config.php b/bootstrap/cache/config.php index 73e55761..4ed2f30b 100644 --- a/bootstrap/cache/config.php +++ b/bootstrap/cache/config.php @@ -491,123 +491,6 @@ ), ), ), - 'filament-shield' => - array ( - 'shield_resource' => - array ( - 'slug' => 'shield/roles', - 'show_model_path' => true, - 'cluster' => NULL, - 'tabs' => - array ( - 'pages' => true, - 'widgets' => true, - 'resources' => true, - 'custom_permissions' => false, - ), - ), - 'tenant_model' => NULL, - 'auth_provider_model' => 'App\\Models\\User', - 'super_admin' => - array ( - 'enabled' => true, - 'name' => 'super_admin', - 'define_via_gate' => false, - 'intercept_gate' => 'before', - ), - 'panel_user' => - array ( - 'enabled' => true, - 'name' => 'panel_user', - ), - 'permissions' => - array ( - 'separator' => ':', - 'case' => 'pascal', - 'generate' => true, - ), - 'policies' => - array ( - 'path' => '/Users/salam/Sites/nuhodds_fi4/app/Policies', - 'merge' => true, - 'generate' => true, - 'methods' => - array ( - 0 => 'viewAny', - 1 => 'view', - 2 => 'create', - 3 => 'update', - 4 => 'delete', - 5 => 'restore', - 6 => 'forceDelete', - 7 => 'forceDeleteAny', - 8 => 'restoreAny', - 9 => 'replicate', - 10 => 'reorder', - ), - 'single_parameter_methods' => - array ( - 0 => 'viewAny', - 1 => 'create', - 2 => 'deleteAny', - 3 => 'forceDeleteAny', - 4 => 'restoreAny', - 5 => 'reorder', - ), - ), - 'localization' => - array ( - 'enabled' => false, - 'key' => 'filament-shield::filament-shield', - ), - 'resources' => - array ( - 'subject' => 'model', - 'manage' => - array ( - 'BezhanSalleh\\FilamentShield\\Resources\\Roles\\RoleResource' => - array ( - 0 => 'viewAny', - 1 => 'view', - 2 => 'create', - 3 => 'update', - 4 => 'delete', - ), - ), - 'exclude' => - array ( - ), - ), - 'pages' => - array ( - 'subject' => 'class', - 'prefix' => 'view', - 'exclude' => - array ( - 0 => 'Filament\\Pages\\Dashboard', - ), - ), - 'widgets' => - array ( - 'subject' => 'class', - 'prefix' => 'view', - 'exclude' => - array ( - 0 => 'Filament\\Widgets\\AccountWidget', - 1 => 'Filament\\Widgets\\FilamentInfoWidget', - ), - ), - 'custom_permissions' => - array ( - ), - 'discovery' => - array ( - 'discover_all_resources' => false, - 'discover_all_widgets' => false, - 'discover_all_pages' => false, - ), - 'register_role_policy' => true, - ), 'filesystems' => array ( 'default' => 'local', diff --git a/bootstrap/cache/filament/panels/admin.php b/bootstrap/cache/filament/panels/admin.php index 49722645..12a21883 100644 --- a/bootstrap/cache/filament/panels/admin.php +++ b/bootstrap/cache/filament/panels/admin.php @@ -21,6 +21,7 @@ 'app.filament.resources.users.pages.create-user' => 'App\\Filament\\Resources\\Users\\Pages\\CreateUser', 'app.filament.resources.users.pages.edit-user' => 'App\\Filament\\Resources\\Users\\Pages\\EditUser', 'app.filament.resources.users.pages.list-users' => 'App\\Filament\\Resources\\Users\\Pages\\ListUsers', + 'app.filament.clusters.administrator.administrator-cluster' => 'App\\Filament\\Clusters\\Administrator\\AdministratorCluster', 'filament.pages.dashboard' => 'Filament\\Pages\\Dashboard', 'filament.widgets.account-widget' => 'Filament\\Widgets\\AccountWidget', 'filament.widgets.filament-info-widget' => 'Filament\\Widgets\\FilamentInfoWidget', @@ -36,16 +37,23 @@ 'filament.auth.pages.login' => 'Filament\\Auth\\Pages\\Login', 'filament.auth.pages.password-reset.request-password-reset' => 'Filament\\Auth\\Pages\\PasswordReset\\RequestPasswordReset', 'filament.auth.pages.password-reset.reset-password' => 'Filament\\Auth\\Pages\\PasswordReset\\ResetPassword', - 'bezhan-salleh.filament-shield.resources.roles.pages.list-roles' => 'BezhanSalleh\\FilamentShield\\Resources\\Roles\\Pages\\ListRoles', - 'bezhan-salleh.filament-shield.resources.roles.pages.create-role' => 'BezhanSalleh\\FilamentShield\\Resources\\Roles\\Pages\\CreateRole', - 'bezhan-salleh.filament-shield.resources.roles.pages.view-role' => 'BezhanSalleh\\FilamentShield\\Resources\\Roles\\Pages\\ViewRole', - 'bezhan-salleh.filament-shield.resources.roles.pages.edit-role' => 'BezhanSalleh\\FilamentShield\\Resources\\Roles\\Pages\\EditRole', ), 'clusters' => array ( + '/Users/salam/Sites/nuhodds_fi4/app/Filament/Clusters/Administrator/AdministratorCluster.php' => 'App\\Filament\\Clusters\\Administrator\\AdministratorCluster', ), 'clusteredComponents' => array ( + 'App\\Filament\\Clusters\\Administrator\\AdministratorCluster' => + array ( + 0 => 'App\\Filament\\Resources\\Bookmakers\\BookmakerResource', + 1 => 'App\\Filament\\Resources\\Clients\\ClientResource', + 2 => 'App\\Filament\\Resources\\Countries\\CountryResource', + 3 => 'App\\Filament\\Resources\\Providers\\ProviderResource', + 4 => 'App\\Filament\\Resources\\Sports\\SportResource', + 5 => 'App\\Filament\\Resources\\Supervisors\\SupervisorResource', + 6 => 'App\\Filament\\Resources\\Users\\UserResource', + ), ), 'clusterDirectories' => array ( @@ -57,6 +65,7 @@ ), 'pages' => array ( + '/Users/salam/Sites/nuhodds_fi4/app/Filament/Clusters/Administrator/AdministratorCluster.php' => 'App\\Filament\\Clusters\\Administrator\\AdministratorCluster', 0 => 'Filament\\Pages\\Dashboard', 1 => 'Joaopaulolndev\\FilamentEditProfile\\Pages\\EditProfilePage', ), @@ -78,7 +87,6 @@ '/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/Sports/SportResource.php' => 'App\\Filament\\Resources\\Sports\\SportResource', '/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/Supervisors/SupervisorResource.php' => 'App\\Filament\\Resources\\Supervisors\\SupervisorResource', '/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/Users/UserResource.php' => 'App\\Filament\\Resources\\Users\\UserResource', - 0 => 'BezhanSalleh\\FilamentShield\\Resources\\Roles\\RoleResource', ), 'resourceDirectories' => array ( diff --git a/bootstrap/cache/packages.php b/bootstrap/cache/packages.php index 711beac7..41432955 100755 --- a/bootstrap/cache/packages.php +++ b/bootstrap/cache/packages.php @@ -13,24 +13,6 @@ 0 => 'Awcodes\\LightSwitch\\LightSwitchServiceProvider', ), ), - 'bezhansalleh/filament-plugin-essentials' => - array ( - 'providers' => - array ( - 0 => 'BezhanSalleh\\PluginEssentials\\PluginEssentialsServiceProvider', - ), - ), - 'bezhansalleh/filament-shield' => - array ( - 'aliases' => - array ( - 'FilamentShield' => 'BezhanSalleh\\FilamentShield\\Facades\\FilamentShield', - ), - 'providers' => - array ( - 0 => 'BezhanSalleh\\FilamentShield\\FilamentShieldServiceProvider', - ), - ), 'blade-ui-kit/blade-heroicons' => array ( 'providers' => @@ -243,13 +225,6 @@ 0 => 'RyanChandler\\BladeCaptureDirective\\BladeCaptureDirectiveServiceProvider', ), ), - 'spatie/laravel-permission' => - array ( - 'providers' => - array ( - 0 => 'Spatie\\Permission\\PermissionServiceProvider', - ), - ), 'swisnl/filament-backgrounds' => array ( 'providers' => diff --git a/bootstrap/cache/routes-v7.php b/bootstrap/cache/routes-v7.php index 5c045a50..223107da 100644 --- a/bootstrap/cache/routes-v7.php +++ b/bootstrap/cache/routes-v7.php @@ -146,6 +146,26 @@ app('router')->setCompiledRoutes( 6 => NULL, ), ), + '/administrator' => + array ( + 0 => + array ( + 0 => + array ( + '_route' => 'filament.admin.administrator', + ), + 1 => NULL, + 2 => + array ( + 'GET' => 0, + 'HEAD' => 1, + ), + 3 => NULL, + 4 => false, + 5 => false, + 6 => NULL, + ), + ), '/edit-profile' => array ( 0 => @@ -166,13 +186,13 @@ app('router')->setCompiledRoutes( 6 => NULL, ), ), - '/bookmakers' => + '/administrator/bookmakers' => array ( 0 => array ( 0 => array ( - '_route' => 'filament.admin.resources.bookmakers.index', + '_route' => 'filament.admin.administrator.resources.bookmakers.index', ), 1 => NULL, 2 => @@ -186,13 +206,13 @@ app('router')->setCompiledRoutes( 6 => NULL, ), ), - '/clients' => + '/administrator/clients' => array ( 0 => array ( 0 => array ( - '_route' => 'filament.admin.resources.clients.index', + '_route' => 'filament.admin.administrator.resources.clients.index', ), 1 => NULL, 2 => @@ -206,13 +226,13 @@ app('router')->setCompiledRoutes( 6 => NULL, ), ), - '/countries' => + '/administrator/countries' => array ( 0 => array ( 0 => array ( - '_route' => 'filament.admin.resources.countries.index', + '_route' => 'filament.admin.administrator.resources.countries.index', ), 1 => NULL, 2 => @@ -246,13 +266,13 @@ app('router')->setCompiledRoutes( 6 => NULL, ), ), - '/providers' => + '/administrator/providers' => array ( 0 => array ( 0 => array ( - '_route' => 'filament.admin.resources.providers.index', + '_route' => 'filament.admin.administrator.resources.providers.index', ), 1 => NULL, 2 => @@ -266,13 +286,13 @@ app('router')->setCompiledRoutes( 6 => NULL, ), ), - '/sports' => + '/administrator/sports' => array ( 0 => array ( 0 => array ( - '_route' => 'filament.admin.resources.sports.index', + '_route' => 'filament.admin.administrator.resources.sports.index', ), 1 => NULL, 2 => @@ -286,13 +306,13 @@ app('router')->setCompiledRoutes( 6 => NULL, ), ), - '/supervisors' => + '/administrator/supervisors' => array ( 0 => array ( 0 => array ( - '_route' => 'filament.admin.resources.supervisors.index', + '_route' => 'filament.admin.administrator.resources.supervisors.index', ), 1 => NULL, 2 => @@ -306,53 +326,13 @@ app('router')->setCompiledRoutes( 6 => NULL, ), ), - '/users' => + '/administrator/users' => array ( 0 => array ( 0 => array ( - '_route' => 'filament.admin.resources.users.index', - ), - 1 => NULL, - 2 => - array ( - 'GET' => 0, - 'HEAD' => 1, - ), - 3 => NULL, - 4 => false, - 5 => false, - 6 => NULL, - ), - ), - '/shield/roles' => - array ( - 0 => - array ( - 0 => - array ( - '_route' => 'filament.admin.resources.shield.roles.index', - ), - 1 => NULL, - 2 => - array ( - 'GET' => 0, - 'HEAD' => 1, - ), - 3 => NULL, - 4 => false, - 5 => false, - 6 => NULL, - ), - ), - '/shield/roles/create' => - array ( - 0 => - array ( - 0 => - array ( - '_route' => 'filament.admin.resources.shield.roles.create', + '_route' => 'filament.admin.administrator.resources.users.index', ), 1 => NULL, 2 => @@ -391,7 +371,7 @@ app('router')->setCompiledRoutes( array ( 0 => array ( - '_route' => 'generated::BsnJs2Ru6kHtIsuN', + '_route' => 'generated::NAQ0GnAJPW1F34JN', ), 1 => NULL, 2 => @@ -411,7 +391,7 @@ app('router')->setCompiledRoutes( array ( 0 => array ( - '_route' => 'generated::cM2p5eFH8g9YqfYx', + '_route' => 'generated::bAH6qgH9xJMW2Hms', ), 1 => NULL, 2 => @@ -450,7 +430,7 @@ app('router')->setCompiledRoutes( array ( 0 => array ( - '_route' => 'generated::4Gul2ykjYGG565LP', + '_route' => 'generated::5VblpRWzkK5oOKwA', ), 1 => NULL, 2 => @@ -467,7 +447,7 @@ app('router')->setCompiledRoutes( ), 2 => array ( - 0 => '{^(?|/filament/(?|exports/([^/]++)/download(*:45)|imports/([^/]++)/failed\\-rows/download(*:90))|/email\\-(?|verification/verify/([^/]++)/([^/]++)(*:146)|change\\-verification/verify/([^/]++)/([^/]++)(?|(*:202)|/block(*:216)))|/s(?|hield/roles/([^/]++)(?|(*:254)|/edit(*:267))|torage/(.*)(*:287))|/livewire/preview\\-file/([^/]++)(*:328))/?$}sDu', + 0 => '{^(?|/filament/(?|exports/([^/]++)/download(*:45)|imports/([^/]++)/failed\\-rows/download(*:90))|/email\\-(?|verification/verify/([^/]++)/([^/]++)(*:146)|change\\-verification/verify/([^/]++)/([^/]++)(?|(*:202)|/block(*:216)))|/livewire/preview\\-file/([^/]++)(*:258)|/storage/(.*)(*:279))/?$}sDu', ), 3 => array ( @@ -589,76 +569,7 @@ app('router')->setCompiledRoutes( 6 => NULL, ), ), - 254 => - array ( - 0 => - array ( - 0 => - array ( - '_route' => 'filament.admin.resources.shield.roles.view', - ), - 1 => - array ( - 0 => 'record', - ), - 2 => - array ( - 'GET' => 0, - 'HEAD' => 1, - ), - 3 => NULL, - 4 => false, - 5 => true, - 6 => NULL, - ), - ), - 267 => - array ( - 0 => - array ( - 0 => - array ( - '_route' => 'filament.admin.resources.shield.roles.edit', - ), - 1 => - array ( - 0 => 'record', - ), - 2 => - array ( - 'GET' => 0, - 'HEAD' => 1, - ), - 3 => NULL, - 4 => false, - 5 => false, - 6 => NULL, - ), - ), - 287 => - array ( - 0 => - array ( - 0 => - array ( - '_route' => 'storage.local', - ), - 1 => - array ( - 0 => 'path', - ), - 2 => - array ( - 'GET' => 0, - 'HEAD' => 1, - ), - 3 => NULL, - 4 => false, - 5 => true, - 6 => NULL, - ), - ), - 328 => + 258 => array ( 0 => array ( @@ -680,6 +591,29 @@ app('router')->setCompiledRoutes( 5 => true, 6 => NULL, ), + ), + 279 => + array ( + 0 => + array ( + 0 => + array ( + '_route' => 'storage.local', + ), + 1 => + array ( + 0 => 'path', + ), + 2 => + array ( + 'GET' => 0, + 'HEAD' => 1, + ), + 3 => NULL, + 4 => false, + 5 => true, + 6 => NULL, + ), 1 => array ( 0 => NULL, @@ -1275,6 +1209,60 @@ app('router')->setCompiledRoutes( 'waitSeconds' => NULL, 'withTrashed' => false, ), + 'filament.admin.administrator' => + array ( + 'methods' => + array ( + 0 => 'GET', + 1 => 'HEAD', + ), + 'uri' => 'administrator', + 'action' => + array ( + 'domain' => NULL, + 'middleware' => + array ( + 0 => 'panel:admin', + 1 => 'Illuminate\\Cookie\\Middleware\\EncryptCookies', + 2 => 'Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse', + 3 => 'Illuminate\\Session\\Middleware\\StartSession', + 4 => 'Filament\\Http\\Middleware\\AuthenticateSession', + 5 => 'Illuminate\\View\\Middleware\\ShareErrorsFromSession', + 6 => 'Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken', + 7 => 'Illuminate\\Routing\\Middleware\\SubstituteBindings', + 8 => 'Filament\\Http\\Middleware\\DisableBladeIconComponents', + 9 => 'Filament\\Http\\Middleware\\DispatchServingFilamentEvent', + 10 => 'Filament\\Http\\Middleware\\Authenticate', + 11 => 'Joaopaulolndev\\FilamentEditProfile\\Http\\Middleware\\SetUserThemeColor:web', + 12 => 'Joaopaulolndev\\FilamentEditProfile\\Http\\Middleware\\SetUserLocale:web', + 13 => 'verified:filament.admin.auth.email-verification.prompt', + ), + 'uses' => 'App\\Filament\\Clusters\\Administrator\\AdministratorCluster@__invoke', + 'controller' => 'App\\Filament\\Clusters\\Administrator\\AdministratorCluster', + 'as' => 'filament.admin.administrator', + 'namespace' => NULL, + 'prefix' => '/', + 'where' => + array ( + ), + 'excluded_middleware' => + array ( + ), + ), + 'fallback' => false, + 'defaults' => + array ( + ), + 'wheres' => + array ( + ), + 'bindingFields' => + array ( + ), + 'lockSeconds' => NULL, + 'waitSeconds' => NULL, + 'withTrashed' => false, + ), 'filament.admin.pages.edit-profile' => array ( 'methods' => @@ -1329,14 +1317,14 @@ app('router')->setCompiledRoutes( 'waitSeconds' => NULL, 'withTrashed' => false, ), - 'filament.admin.resources.bookmakers.index' => + 'filament.admin.administrator.resources.bookmakers.index' => array ( 'methods' => array ( 0 => 'GET', 1 => 'HEAD', ), - 'uri' => 'bookmakers', + 'uri' => 'administrator/bookmakers', 'action' => array ( 'domain' => NULL, @@ -1362,9 +1350,9 @@ app('router')->setCompiledRoutes( ), 'uses' => 'App\\Filament\\Resources\\Bookmakers\\Pages\\ListBookmakers@__invoke', 'controller' => 'App\\Filament\\Resources\\Bookmakers\\Pages\\ListBookmakers', - 'as' => 'filament.admin.resources.bookmakers.index', + 'as' => 'filament.admin.administrator.resources.bookmakers.index', 'namespace' => NULL, - 'prefix' => '/bookmakers', + 'prefix' => 'administrator/bookmakers', 'where' => array ( ), @@ -1383,14 +1371,14 @@ app('router')->setCompiledRoutes( 'waitSeconds' => NULL, 'withTrashed' => false, ), - 'filament.admin.resources.clients.index' => + 'filament.admin.administrator.resources.clients.index' => array ( 'methods' => array ( 0 => 'GET', 1 => 'HEAD', ), - 'uri' => 'clients', + 'uri' => 'administrator/clients', 'action' => array ( 'domain' => NULL, @@ -1416,9 +1404,9 @@ app('router')->setCompiledRoutes( ), 'uses' => 'App\\Filament\\Resources\\Clients\\Pages\\ListClients@__invoke', 'controller' => 'App\\Filament\\Resources\\Clients\\Pages\\ListClients', - 'as' => 'filament.admin.resources.clients.index', + 'as' => 'filament.admin.administrator.resources.clients.index', 'namespace' => NULL, - 'prefix' => '/clients', + 'prefix' => 'administrator/clients', 'where' => array ( ), @@ -1437,14 +1425,14 @@ app('router')->setCompiledRoutes( 'waitSeconds' => NULL, 'withTrashed' => false, ), - 'filament.admin.resources.countries.index' => + 'filament.admin.administrator.resources.countries.index' => array ( 'methods' => array ( 0 => 'GET', 1 => 'HEAD', ), - 'uri' => 'countries', + 'uri' => 'administrator/countries', 'action' => array ( 'domain' => NULL, @@ -1470,9 +1458,9 @@ app('router')->setCompiledRoutes( ), 'uses' => 'App\\Filament\\Resources\\Countries\\Pages\\ManageCountries@__invoke', 'controller' => 'App\\Filament\\Resources\\Countries\\Pages\\ManageCountries', - 'as' => 'filament.admin.resources.countries.index', + 'as' => 'filament.admin.administrator.resources.countries.index', 'namespace' => NULL, - 'prefix' => '/countries', + 'prefix' => 'administrator/countries', 'where' => array ( ), @@ -1545,14 +1533,14 @@ app('router')->setCompiledRoutes( 'waitSeconds' => NULL, 'withTrashed' => false, ), - 'filament.admin.resources.providers.index' => + 'filament.admin.administrator.resources.providers.index' => array ( 'methods' => array ( 0 => 'GET', 1 => 'HEAD', ), - 'uri' => 'providers', + 'uri' => 'administrator/providers', 'action' => array ( 'domain' => NULL, @@ -1578,9 +1566,9 @@ app('router')->setCompiledRoutes( ), 'uses' => 'App\\Filament\\Resources\\Providers\\Pages\\ListProviders@__invoke', 'controller' => 'App\\Filament\\Resources\\Providers\\Pages\\ListProviders', - 'as' => 'filament.admin.resources.providers.index', + 'as' => 'filament.admin.administrator.resources.providers.index', 'namespace' => NULL, - 'prefix' => '/providers', + 'prefix' => 'administrator/providers', 'where' => array ( ), @@ -1599,14 +1587,14 @@ app('router')->setCompiledRoutes( 'waitSeconds' => NULL, 'withTrashed' => false, ), - 'filament.admin.resources.sports.index' => + 'filament.admin.administrator.resources.sports.index' => array ( 'methods' => array ( 0 => 'GET', 1 => 'HEAD', ), - 'uri' => 'sports', + 'uri' => 'administrator/sports', 'action' => array ( 'domain' => NULL, @@ -1632,9 +1620,9 @@ app('router')->setCompiledRoutes( ), 'uses' => 'App\\Filament\\Resources\\Sports\\Pages\\ManageSports@__invoke', 'controller' => 'App\\Filament\\Resources\\Sports\\Pages\\ManageSports', - 'as' => 'filament.admin.resources.sports.index', + 'as' => 'filament.admin.administrator.resources.sports.index', 'namespace' => NULL, - 'prefix' => '/sports', + 'prefix' => 'administrator/sports', 'where' => array ( ), @@ -1653,14 +1641,14 @@ app('router')->setCompiledRoutes( 'waitSeconds' => NULL, 'withTrashed' => false, ), - 'filament.admin.resources.supervisors.index' => + 'filament.admin.administrator.resources.supervisors.index' => array ( 'methods' => array ( 0 => 'GET', 1 => 'HEAD', ), - 'uri' => 'supervisors', + 'uri' => 'administrator/supervisors', 'action' => array ( 'domain' => NULL, @@ -1686,9 +1674,9 @@ app('router')->setCompiledRoutes( ), 'uses' => 'App\\Filament\\Resources\\Supervisors\\Pages\\ListSupervisors@__invoke', 'controller' => 'App\\Filament\\Resources\\Supervisors\\Pages\\ListSupervisors', - 'as' => 'filament.admin.resources.supervisors.index', + 'as' => 'filament.admin.administrator.resources.supervisors.index', 'namespace' => NULL, - 'prefix' => '/supervisors', + 'prefix' => 'administrator/supervisors', 'where' => array ( ), @@ -1707,14 +1695,14 @@ app('router')->setCompiledRoutes( 'waitSeconds' => NULL, 'withTrashed' => false, ), - 'filament.admin.resources.users.index' => + 'filament.admin.administrator.resources.users.index' => array ( 'methods' => array ( 0 => 'GET', 1 => 'HEAD', ), - 'uri' => 'users', + 'uri' => 'administrator/users', 'action' => array ( 'domain' => NULL, @@ -1740,225 +1728,9 @@ app('router')->setCompiledRoutes( ), 'uses' => 'App\\Filament\\Resources\\Users\\Pages\\ListUsers@__invoke', 'controller' => 'App\\Filament\\Resources\\Users\\Pages\\ListUsers', - 'as' => 'filament.admin.resources.users.index', + 'as' => 'filament.admin.administrator.resources.users.index', 'namespace' => NULL, - 'prefix' => '/users', - 'where' => - array ( - ), - ), - 'fallback' => false, - 'defaults' => - array ( - ), - 'wheres' => - array ( - ), - 'bindingFields' => - array ( - ), - 'lockSeconds' => NULL, - 'waitSeconds' => NULL, - 'withTrashed' => false, - ), - 'filament.admin.resources.shield.roles.index' => - array ( - 'methods' => - array ( - 0 => 'GET', - 1 => 'HEAD', - ), - 'uri' => 'shield/roles', - 'action' => - array ( - 'domain' => NULL, - 'middleware' => - array ( - 0 => 'panel:admin', - 1 => 'Illuminate\\Cookie\\Middleware\\EncryptCookies', - 2 => 'Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse', - 3 => 'Illuminate\\Session\\Middleware\\StartSession', - 4 => 'Filament\\Http\\Middleware\\AuthenticateSession', - 5 => 'Illuminate\\View\\Middleware\\ShareErrorsFromSession', - 6 => 'Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken', - 7 => 'Illuminate\\Routing\\Middleware\\SubstituteBindings', - 8 => 'Filament\\Http\\Middleware\\DisableBladeIconComponents', - 9 => 'Filament\\Http\\Middleware\\DispatchServingFilamentEvent', - 10 => 'Filament\\Http\\Middleware\\Authenticate', - 11 => 'Joaopaulolndev\\FilamentEditProfile\\Http\\Middleware\\SetUserThemeColor:web', - 12 => 'Joaopaulolndev\\FilamentEditProfile\\Http\\Middleware\\SetUserLocale:web', - 13 => 'verified:filament.admin.auth.email-verification.prompt', - ), - 'excluded_middleware' => - array ( - ), - 'uses' => 'BezhanSalleh\\FilamentShield\\Resources\\Roles\\Pages\\ListRoles@__invoke', - 'controller' => 'BezhanSalleh\\FilamentShield\\Resources\\Roles\\Pages\\ListRoles', - 'as' => 'filament.admin.resources.shield.roles.index', - 'namespace' => NULL, - 'prefix' => '/shield/roles', - 'where' => - array ( - ), - ), - 'fallback' => false, - 'defaults' => - array ( - ), - 'wheres' => - array ( - ), - 'bindingFields' => - array ( - ), - 'lockSeconds' => NULL, - 'waitSeconds' => NULL, - 'withTrashed' => false, - ), - 'filament.admin.resources.shield.roles.create' => - array ( - 'methods' => - array ( - 0 => 'GET', - 1 => 'HEAD', - ), - 'uri' => 'shield/roles/create', - 'action' => - array ( - 'domain' => NULL, - 'middleware' => - array ( - 0 => 'panel:admin', - 1 => 'Illuminate\\Cookie\\Middleware\\EncryptCookies', - 2 => 'Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse', - 3 => 'Illuminate\\Session\\Middleware\\StartSession', - 4 => 'Filament\\Http\\Middleware\\AuthenticateSession', - 5 => 'Illuminate\\View\\Middleware\\ShareErrorsFromSession', - 6 => 'Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken', - 7 => 'Illuminate\\Routing\\Middleware\\SubstituteBindings', - 8 => 'Filament\\Http\\Middleware\\DisableBladeIconComponents', - 9 => 'Filament\\Http\\Middleware\\DispatchServingFilamentEvent', - 10 => 'Filament\\Http\\Middleware\\Authenticate', - 11 => 'Joaopaulolndev\\FilamentEditProfile\\Http\\Middleware\\SetUserThemeColor:web', - 12 => 'Joaopaulolndev\\FilamentEditProfile\\Http\\Middleware\\SetUserLocale:web', - 13 => 'verified:filament.admin.auth.email-verification.prompt', - ), - 'excluded_middleware' => - array ( - ), - 'uses' => 'BezhanSalleh\\FilamentShield\\Resources\\Roles\\Pages\\CreateRole@__invoke', - 'controller' => 'BezhanSalleh\\FilamentShield\\Resources\\Roles\\Pages\\CreateRole', - 'as' => 'filament.admin.resources.shield.roles.create', - 'namespace' => NULL, - 'prefix' => '/shield/roles', - 'where' => - array ( - ), - ), - 'fallback' => false, - 'defaults' => - array ( - ), - 'wheres' => - array ( - ), - 'bindingFields' => - array ( - ), - 'lockSeconds' => NULL, - 'waitSeconds' => NULL, - 'withTrashed' => false, - ), - 'filament.admin.resources.shield.roles.view' => - array ( - 'methods' => - array ( - 0 => 'GET', - 1 => 'HEAD', - ), - 'uri' => 'shield/roles/{record}', - 'action' => - array ( - 'domain' => NULL, - 'middleware' => - array ( - 0 => 'panel:admin', - 1 => 'Illuminate\\Cookie\\Middleware\\EncryptCookies', - 2 => 'Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse', - 3 => 'Illuminate\\Session\\Middleware\\StartSession', - 4 => 'Filament\\Http\\Middleware\\AuthenticateSession', - 5 => 'Illuminate\\View\\Middleware\\ShareErrorsFromSession', - 6 => 'Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken', - 7 => 'Illuminate\\Routing\\Middleware\\SubstituteBindings', - 8 => 'Filament\\Http\\Middleware\\DisableBladeIconComponents', - 9 => 'Filament\\Http\\Middleware\\DispatchServingFilamentEvent', - 10 => 'Filament\\Http\\Middleware\\Authenticate', - 11 => 'Joaopaulolndev\\FilamentEditProfile\\Http\\Middleware\\SetUserThemeColor:web', - 12 => 'Joaopaulolndev\\FilamentEditProfile\\Http\\Middleware\\SetUserLocale:web', - 13 => 'verified:filament.admin.auth.email-verification.prompt', - ), - 'excluded_middleware' => - array ( - ), - 'uses' => 'BezhanSalleh\\FilamentShield\\Resources\\Roles\\Pages\\ViewRole@__invoke', - 'controller' => 'BezhanSalleh\\FilamentShield\\Resources\\Roles\\Pages\\ViewRole', - 'as' => 'filament.admin.resources.shield.roles.view', - 'namespace' => NULL, - 'prefix' => '/shield/roles', - 'where' => - array ( - ), - ), - 'fallback' => false, - 'defaults' => - array ( - ), - 'wheres' => - array ( - ), - 'bindingFields' => - array ( - ), - 'lockSeconds' => NULL, - 'waitSeconds' => NULL, - 'withTrashed' => false, - ), - 'filament.admin.resources.shield.roles.edit' => - array ( - 'methods' => - array ( - 0 => 'GET', - 1 => 'HEAD', - ), - 'uri' => 'shield/roles/{record}/edit', - 'action' => - array ( - 'domain' => NULL, - 'middleware' => - array ( - 0 => 'panel:admin', - 1 => 'Illuminate\\Cookie\\Middleware\\EncryptCookies', - 2 => 'Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse', - 3 => 'Illuminate\\Session\\Middleware\\StartSession', - 4 => 'Filament\\Http\\Middleware\\AuthenticateSession', - 5 => 'Illuminate\\View\\Middleware\\ShareErrorsFromSession', - 6 => 'Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken', - 7 => 'Illuminate\\Routing\\Middleware\\SubstituteBindings', - 8 => 'Filament\\Http\\Middleware\\DisableBladeIconComponents', - 9 => 'Filament\\Http\\Middleware\\DispatchServingFilamentEvent', - 10 => 'Filament\\Http\\Middleware\\Authenticate', - 11 => 'Joaopaulolndev\\FilamentEditProfile\\Http\\Middleware\\SetUserThemeColor:web', - 12 => 'Joaopaulolndev\\FilamentEditProfile\\Http\\Middleware\\SetUserLocale:web', - 13 => 'verified:filament.admin.auth.email-verification.prompt', - ), - 'excluded_middleware' => - array ( - ), - 'uses' => 'BezhanSalleh\\FilamentShield\\Resources\\Roles\\Pages\\EditRole@__invoke', - 'controller' => 'BezhanSalleh\\FilamentShield\\Resources\\Roles\\Pages\\EditRole', - 'as' => 'filament.admin.resources.shield.roles.edit', - 'namespace' => NULL, - 'prefix' => '/shield/roles', + 'prefix' => 'administrator/users', 'where' => array ( ), @@ -2008,7 +1780,7 @@ app('router')->setCompiledRoutes( 'waitSeconds' => NULL, 'withTrashed' => false, ), - 'generated::BsnJs2Ru6kHtIsuN' => + 'generated::NAQ0GnAJPW1F34JN' => array ( 'methods' => array ( @@ -2020,7 +1792,7 @@ app('router')->setCompiledRoutes( array ( 'uses' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@returnJavaScriptAsFile', 'controller' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@returnJavaScriptAsFile', - 'as' => 'generated::BsnJs2Ru6kHtIsuN', + 'as' => 'generated::NAQ0GnAJPW1F34JN', ), 'fallback' => false, 'defaults' => @@ -2036,7 +1808,7 @@ app('router')->setCompiledRoutes( 'waitSeconds' => NULL, 'withTrashed' => false, ), - 'generated::cM2p5eFH8g9YqfYx' => + 'generated::bAH6qgH9xJMW2Hms' => array ( 'methods' => array ( @@ -2048,7 +1820,7 @@ app('router')->setCompiledRoutes( array ( 'uses' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@maps', 'controller' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@maps', - 'as' => 'generated::cM2p5eFH8g9YqfYx', + 'as' => 'generated::bAH6qgH9xJMW2Hms', ), 'fallback' => false, 'defaults' => @@ -2119,7 +1891,7 @@ app('router')->setCompiledRoutes( 'waitSeconds' => NULL, 'withTrashed' => false, ), - 'generated::4Gul2ykjYGG565LP' => + 'generated::5VblpRWzkK5oOKwA' => array ( 'methods' => array ( @@ -2147,8 +1919,8 @@ app('router')->setCompiledRoutes( return response(\\Illuminate\\Support\\Facades\\View::file(\'/Users/salam/Sites/nuhodds_fi4/vendor/laravel/framework/src/Illuminate/Foundation/Configuration\'.\'/../resources/health-up.blade.php\', [ \'exception\' => $exception, ]), status: $exception ? 500 : 200); - }";s:5:"scope";s:54:"Illuminate\\Foundation\\Configuration\\ApplicationBuilder";s:4:"this";N;s:4:"self";s:32:"0000000000000ef10000000000000000";}}', - 'as' => 'generated::4Gul2ykjYGG565LP', + }";s:5:"scope";s:54:"Illuminate\\Foundation\\Configuration\\ApplicationBuilder";s:4:"this";N;s:4:"self";s:32:"0000000000000dd90000000000000000";}}', + 'as' => 'generated::5VblpRWzkK5oOKwA', ), 'fallback' => false, 'defaults' => @@ -2180,7 +1952,7 @@ app('router')->setCompiledRoutes( $config, $isProduction ))($request, $path); - }";s:5:"scope";s:47:"Illuminate\\Filesystem\\FilesystemServiceProvider";s:4:"this";N;s:4:"self";s:32:"0000000000000ee70000000000000000";}}', + }";s:5:"scope";s:47:"Illuminate\\Filesystem\\FilesystemServiceProvider";s:4:"this";N;s:4:"self";s:32:"0000000000000dcf0000000000000000";}}', 'as' => 'storage.local', ), 'fallback' => false, diff --git a/bootstrap/cache/services.php b/bootstrap/cache/services.php index 7a191c64..a2397d32 100755 --- a/bootstrap/cache/services.php +++ b/bootstrap/cache/services.php @@ -25,41 +25,38 @@ 21 => 'Illuminate\\Validation\\ValidationServiceProvider', 22 => 'Illuminate\\View\\ViewServiceProvider', 23 => 'Awcodes\\LightSwitch\\LightSwitchServiceProvider', - 24 => 'BezhanSalleh\\PluginEssentials\\PluginEssentialsServiceProvider', - 25 => 'BezhanSalleh\\FilamentShield\\FilamentShieldServiceProvider', - 26 => 'BladeUI\\Heroicons\\BladeHeroiconsServiceProvider', - 27 => 'BladeUI\\Icons\\BladeIconsServiceProvider', - 28 => 'Codeat3\\BladePhosphorIcons\\BladePhosphorIconsServiceProvider', - 29 => 'CodeWithDennis\\FilamentLucideIcons\\FilamentLucideIconsServiceProvider', - 30 => 'Filament\\Actions\\ActionsServiceProvider', - 31 => 'Filament\\FilamentServiceProvider', - 32 => 'Filament\\Forms\\FormsServiceProvider', - 33 => 'Filament\\Infolists\\InfolistsServiceProvider', - 34 => 'Filament\\Notifications\\NotificationsServiceProvider', - 35 => 'Filament\\QueryBuilder\\QueryBuilderServiceProvider', - 36 => 'Filament\\Schemas\\SchemasServiceProvider', - 37 => 'Filament\\Support\\SupportServiceProvider', - 38 => 'Filament\\Tables\\TablesServiceProvider', - 39 => 'Filament\\Upgrade\\UpgradeServiceProvider', - 40 => 'Filament\\Widgets\\WidgetsServiceProvider', - 41 => 'Jenssegers\\Agent\\AgentServiceProvider', - 42 => 'Joaopaulolndev\\FilamentEditProfile\\FilamentEditProfileServiceProvider', - 43 => 'Kirschbaum\\PowerJoins\\PowerJoinsServiceProvider', - 44 => 'Laravel\\Pail\\PailServiceProvider', - 45 => 'Laravel\\Sail\\SailServiceProvider', - 46 => 'Laravel\\Tinker\\TinkerServiceProvider', - 47 => 'Livewire\\LivewireServiceProvider', - 48 => 'Carbon\\Laravel\\ServiceProvider', - 49 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider', - 50 => 'Termwind\\Laravel\\TermwindServiceProvider', - 51 => 'OutheBox\\BladeFlags\\BladeFlagsServiceProvider', - 52 => 'Pest\\Laravel\\PestServiceProvider', - 53 => 'RyanChandler\\BladeCaptureDirective\\BladeCaptureDirectiveServiceProvider', - 54 => 'Spatie\\Permission\\PermissionServiceProvider', - 55 => 'Swis\\Filament\\Backgrounds\\FilamentBackgroundsServiceProvider', - 56 => 'Technikermathe\\LucideIcons\\BladeLucideIconsServiceProvider', - 57 => 'App\\Providers\\AppServiceProvider', - 58 => 'App\\Providers\\Filament\\AdminPanelProvider', + 24 => 'BladeUI\\Heroicons\\BladeHeroiconsServiceProvider', + 25 => 'BladeUI\\Icons\\BladeIconsServiceProvider', + 26 => 'Codeat3\\BladePhosphorIcons\\BladePhosphorIconsServiceProvider', + 27 => 'CodeWithDennis\\FilamentLucideIcons\\FilamentLucideIconsServiceProvider', + 28 => 'Filament\\Actions\\ActionsServiceProvider', + 29 => 'Filament\\FilamentServiceProvider', + 30 => 'Filament\\Forms\\FormsServiceProvider', + 31 => 'Filament\\Infolists\\InfolistsServiceProvider', + 32 => 'Filament\\Notifications\\NotificationsServiceProvider', + 33 => 'Filament\\QueryBuilder\\QueryBuilderServiceProvider', + 34 => 'Filament\\Schemas\\SchemasServiceProvider', + 35 => 'Filament\\Support\\SupportServiceProvider', + 36 => 'Filament\\Tables\\TablesServiceProvider', + 37 => 'Filament\\Upgrade\\UpgradeServiceProvider', + 38 => 'Filament\\Widgets\\WidgetsServiceProvider', + 39 => 'Jenssegers\\Agent\\AgentServiceProvider', + 40 => 'Joaopaulolndev\\FilamentEditProfile\\FilamentEditProfileServiceProvider', + 41 => 'Kirschbaum\\PowerJoins\\PowerJoinsServiceProvider', + 42 => 'Laravel\\Pail\\PailServiceProvider', + 43 => 'Laravel\\Sail\\SailServiceProvider', + 44 => 'Laravel\\Tinker\\TinkerServiceProvider', + 45 => 'Livewire\\LivewireServiceProvider', + 46 => 'Carbon\\Laravel\\ServiceProvider', + 47 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider', + 48 => 'Termwind\\Laravel\\TermwindServiceProvider', + 49 => 'OutheBox\\BladeFlags\\BladeFlagsServiceProvider', + 50 => 'Pest\\Laravel\\PestServiceProvider', + 51 => 'RyanChandler\\BladeCaptureDirective\\BladeCaptureDirectiveServiceProvider', + 52 => 'Swis\\Filament\\Backgrounds\\FilamentBackgroundsServiceProvider', + 53 => 'Technikermathe\\LucideIcons\\BladeLucideIconsServiceProvider', + 54 => 'App\\Providers\\AppServiceProvider', + 55 => 'App\\Providers\\Filament\\AdminPanelProvider', ), 'eager' => array ( @@ -74,39 +71,36 @@ 8 => 'Illuminate\\Session\\SessionServiceProvider', 9 => 'Illuminate\\View\\ViewServiceProvider', 10 => 'Awcodes\\LightSwitch\\LightSwitchServiceProvider', - 11 => 'BezhanSalleh\\PluginEssentials\\PluginEssentialsServiceProvider', - 12 => 'BezhanSalleh\\FilamentShield\\FilamentShieldServiceProvider', - 13 => 'BladeUI\\Heroicons\\BladeHeroiconsServiceProvider', - 14 => 'BladeUI\\Icons\\BladeIconsServiceProvider', - 15 => 'Codeat3\\BladePhosphorIcons\\BladePhosphorIconsServiceProvider', - 16 => 'CodeWithDennis\\FilamentLucideIcons\\FilamentLucideIconsServiceProvider', - 17 => 'Filament\\Actions\\ActionsServiceProvider', - 18 => 'Filament\\FilamentServiceProvider', - 19 => 'Filament\\Forms\\FormsServiceProvider', - 20 => 'Filament\\Infolists\\InfolistsServiceProvider', - 21 => 'Filament\\Notifications\\NotificationsServiceProvider', - 22 => 'Filament\\QueryBuilder\\QueryBuilderServiceProvider', - 23 => 'Filament\\Schemas\\SchemasServiceProvider', - 24 => 'Filament\\Support\\SupportServiceProvider', - 25 => 'Filament\\Tables\\TablesServiceProvider', - 26 => 'Filament\\Upgrade\\UpgradeServiceProvider', - 27 => 'Filament\\Widgets\\WidgetsServiceProvider', - 28 => 'Jenssegers\\Agent\\AgentServiceProvider', - 29 => 'Joaopaulolndev\\FilamentEditProfile\\FilamentEditProfileServiceProvider', - 30 => 'Kirschbaum\\PowerJoins\\PowerJoinsServiceProvider', - 31 => 'Laravel\\Pail\\PailServiceProvider', - 32 => 'Livewire\\LivewireServiceProvider', - 33 => 'Carbon\\Laravel\\ServiceProvider', - 34 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider', - 35 => 'Termwind\\Laravel\\TermwindServiceProvider', - 36 => 'OutheBox\\BladeFlags\\BladeFlagsServiceProvider', - 37 => 'Pest\\Laravel\\PestServiceProvider', - 38 => 'RyanChandler\\BladeCaptureDirective\\BladeCaptureDirectiveServiceProvider', - 39 => 'Spatie\\Permission\\PermissionServiceProvider', - 40 => 'Swis\\Filament\\Backgrounds\\FilamentBackgroundsServiceProvider', - 41 => 'Technikermathe\\LucideIcons\\BladeLucideIconsServiceProvider', - 42 => 'App\\Providers\\AppServiceProvider', - 43 => 'App\\Providers\\Filament\\AdminPanelProvider', + 11 => 'BladeUI\\Heroicons\\BladeHeroiconsServiceProvider', + 12 => 'BladeUI\\Icons\\BladeIconsServiceProvider', + 13 => 'Codeat3\\BladePhosphorIcons\\BladePhosphorIconsServiceProvider', + 14 => 'CodeWithDennis\\FilamentLucideIcons\\FilamentLucideIconsServiceProvider', + 15 => 'Filament\\Actions\\ActionsServiceProvider', + 16 => 'Filament\\FilamentServiceProvider', + 17 => 'Filament\\Forms\\FormsServiceProvider', + 18 => 'Filament\\Infolists\\InfolistsServiceProvider', + 19 => 'Filament\\Notifications\\NotificationsServiceProvider', + 20 => 'Filament\\QueryBuilder\\QueryBuilderServiceProvider', + 21 => 'Filament\\Schemas\\SchemasServiceProvider', + 22 => 'Filament\\Support\\SupportServiceProvider', + 23 => 'Filament\\Tables\\TablesServiceProvider', + 24 => 'Filament\\Upgrade\\UpgradeServiceProvider', + 25 => 'Filament\\Widgets\\WidgetsServiceProvider', + 26 => 'Jenssegers\\Agent\\AgentServiceProvider', + 27 => 'Joaopaulolndev\\FilamentEditProfile\\FilamentEditProfileServiceProvider', + 28 => 'Kirschbaum\\PowerJoins\\PowerJoinsServiceProvider', + 29 => 'Laravel\\Pail\\PailServiceProvider', + 30 => 'Livewire\\LivewireServiceProvider', + 31 => 'Carbon\\Laravel\\ServiceProvider', + 32 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider', + 33 => 'Termwind\\Laravel\\TermwindServiceProvider', + 34 => 'OutheBox\\BladeFlags\\BladeFlagsServiceProvider', + 35 => 'Pest\\Laravel\\PestServiceProvider', + 36 => 'RyanChandler\\BladeCaptureDirective\\BladeCaptureDirectiveServiceProvider', + 37 => 'Swis\\Filament\\Backgrounds\\FilamentBackgroundsServiceProvider', + 38 => 'Technikermathe\\LucideIcons\\BladeLucideIconsServiceProvider', + 39 => 'App\\Providers\\AppServiceProvider', + 40 => 'App\\Providers\\Filament\\AdminPanelProvider', ), 'deferred' => array ( diff --git a/composer.json b/composer.json index 9726401e..4681ad92 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,6 @@ "require": { "php": "^8.3", "awcodes/light-switch": "^2.0", - "bezhansalleh/filament-shield": "^4.0", "codeat3/blade-phosphor-icons": "^2.0", "codewithdennis/filament-lucide-icons": "*", "filament/filament": "^4.0", diff --git a/composer.lock b/composer.lock index a019bd47..dfe759d8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e97cae1dbcd690943f89f48799f58237", + "content-hash": "a0295c6180844fb41e7aa201bd8e3cb1", "packages": [ { "name": "anourvalar/eloquent-serialize", @@ -145,178 +145,6 @@ ], "time": "2025-09-18T15:22:43+00:00" }, - { - "name": "bezhansalleh/filament-plugin-essentials", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/bezhanSalleh/filament-plugin-essentials.git", - "reference": "fb4656c661270133b1b1c4297616745e4d586ca7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/bezhanSalleh/filament-plugin-essentials/zipball/fb4656c661270133b1b1c4297616745e4d586ca7", - "reference": "fb4656c661270133b1b1c4297616745e4d586ca7", - "shasum": "" - }, - "require": { - "filament/filament": "^4.0", - "illuminate/contracts": "^11.28|^12.0", - "php": "^8.2", - "spatie/laravel-package-tools": "^1.9" - }, - "require-dev": { - "larastan/larastan": "^2.9||^3.0", - "laravel/pint": "^1.14", - "nunomaduro/collision": "^8.1.1||^7.10.0", - "orchestra/testbench": "^10.0.0||^9.0.0", - "pestphp/pest": "^3.0", - "pestphp/pest-plugin-arch": "^3.0", - "pestphp/pest-plugin-laravel": "^3.0", - "pestphp/pest-plugin-type-coverage": "^3.5", - "phpstan/extension-installer": "^1.3||^2.0", - "phpstan/phpstan-deprecation-rules": "^1.1||^2.0", - "phpstan/phpstan-phpunit": "^1.3||^2.0", - "rector/rector": "^2.1", - "spatie/laravel-ray": "^1.40" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "BezhanSalleh\\PluginEssentials\\PluginEssentialsServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "BezhanSalleh\\PluginEssentials\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bezhan Salleh", - "email": "bezhan_salleh@yahoo.com", - "role": "Developer" - } - ], - "description": "A collection of essential traits that streamline Filament plugin development by taking care of the boilerplate, so you can focus on shipping real features faster", - "homepage": "https://github.com/bezhansalleh/filament-plugin-essentials", - "keywords": [ - "Bezhan Salleh", - "filament-plugin-essentials", - "laravel" - ], - "support": { - "issues": "https://github.com/bezhanSalleh/filament-plugin-essentials/issues", - "source": "https://github.com/bezhanSalleh/filament-plugin-essentials/tree/1.0.0" - }, - "funding": [ - { - "url": "https://github.com/bezhanSalleh", - "type": "github" - } - ], - "time": "2025-08-31T06:50:44+00:00" - }, - { - "name": "bezhansalleh/filament-shield", - "version": "4.0.2", - "source": { - "type": "git", - "url": "https://github.com/bezhanSalleh/filament-shield.git", - "reference": "1c7b21dbac1e80bb05a409c9b13926c13ff210ab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/bezhanSalleh/filament-shield/zipball/1c7b21dbac1e80bb05a409c9b13926c13ff210ab", - "reference": "1c7b21dbac1e80bb05a409c9b13926c13ff210ab", - "shasum": "" - }, - "require": { - "bezhansalleh/filament-plugin-essentials": "^1.0", - "filament/filament": "^4.0", - "illuminate/contracts": "^11.28|^12.0", - "illuminate/support": "*", - "php": "^8.2", - "spatie/laravel-package-tools": "^1.9", - "spatie/laravel-permission": "^6.0" - }, - "require-dev": { - "larastan/larastan": "^2.2|^3.0", - "laravel/pint": "^1.0", - "nunomaduro/collision": "^7.0|^8.0", - "orchestra/testbench": "^8.0|^9.0|^10.0", - "pestphp/pest": "^2.0|^3.0", - "pestphp/pest-plugin-laravel": "^2.0|^3.0", - "pestphp/pest-plugin-livewire": "^3.0", - "pestphp/pest-plugin-type-coverage": "^3.5", - "phpstan/extension-installer": "^1.4", - "phpstan/phpstan": "^2.1", - "phpstan/phpstan-deprecation-rules": "^2.0", - "phpstan/phpstan-phpunit": "^2.0", - "phpunit/phpunit": "^10.1|^11.0", - "rector/rector": "^2.1", - "spatie/laravel-ray": "^1.40" - }, - "type": "library", - "extra": { - "laravel": { - "aliases": { - "FilamentShield": "BezhanSalleh\\FilamentShield\\Facades\\FilamentShield" - }, - "providers": [ - "BezhanSalleh\\FilamentShield\\FilamentShieldServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "BezhanSalleh\\FilamentShield\\": "src", - "BezhanSalleh\\FilamentShield\\Database\\Factories\\": "database/factories" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bezhan Salleh", - "email": "bezhan_salleh@yahoo.com", - "role": "Developer" - } - ], - "description": "Filament support for `spatie/laravel-permission`.", - "homepage": "https://github.com/bezhansalleh/filament-shield", - "keywords": [ - "acl", - "bezhanSalleh", - "filament", - "filament-shield", - "laravel", - "permission", - "permissions", - "rbac", - "roles", - "security" - ], - "support": { - "issues": "https://github.com/bezhanSalleh/filament-shield/issues", - "source": "https://github.com/bezhanSalleh/filament-shield/tree/4.0.2" - }, - "funding": [ - { - "url": "https://github.com/bezhanSalleh", - "type": "github" - } - ], - "time": "2025-09-11T02:13:12+00:00" - }, { "name": "blade-ui-kit/blade-heroicons", "version": "2.6.0", @@ -5988,89 +5816,6 @@ ], "time": "2025-07-17T15:46:43+00:00" }, - { - "name": "spatie/laravel-permission", - "version": "6.23.0", - "source": { - "type": "git", - "url": "https://github.com/spatie/laravel-permission.git", - "reference": "9e41247bd512b1e6c229afbc1eb528f7565ae3bb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-permission/zipball/9e41247bd512b1e6c229afbc1eb528f7565ae3bb", - "reference": "9e41247bd512b1e6c229afbc1eb528f7565ae3bb", - "shasum": "" - }, - "require": { - "illuminate/auth": "^8.12|^9.0|^10.0|^11.0|^12.0", - "illuminate/container": "^8.12|^9.0|^10.0|^11.0|^12.0", - "illuminate/contracts": "^8.12|^9.0|^10.0|^11.0|^12.0", - "illuminate/database": "^8.12|^9.0|^10.0|^11.0|^12.0", - "php": "^8.0" - }, - "require-dev": { - "laravel/passport": "^11.0|^12.0", - "laravel/pint": "^1.0", - "orchestra/testbench": "^6.23|^7.0|^8.0|^9.0|^10.0", - "phpunit/phpunit": "^9.4|^10.1|^11.5" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Spatie\\Permission\\PermissionServiceProvider" - ] - }, - "branch-alias": { - "dev-main": "6.x-dev", - "dev-master": "6.x-dev" - } - }, - "autoload": { - "files": [ - "src/helpers.php" - ], - "psr-4": { - "Spatie\\Permission\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Freek Van der Herten", - "email": "freek@spatie.be", - "homepage": "https://spatie.be", - "role": "Developer" - } - ], - "description": "Permission handling for Laravel 8.0 and up", - "homepage": "https://github.com/spatie/laravel-permission", - "keywords": [ - "acl", - "laravel", - "permission", - "permissions", - "rbac", - "roles", - "security", - "spatie" - ], - "support": { - "issues": "https://github.com/spatie/laravel-permission/issues", - "source": "https://github.com/spatie/laravel-permission/tree/6.23.0" - }, - "funding": [ - { - "url": "https://github.com/spatie", - "type": "github" - } - ], - "time": "2025-11-03T20:16:13+00:00" - }, { "name": "spatie/shiki-php", "version": "2.3.2", diff --git a/config/filament-shield.php b/config/filament-shield.php deleted file mode 100644 index 4fafd7e9..00000000 --- a/config/filament-shield.php +++ /dev/null @@ -1,261 +0,0 @@ - [ - 'slug' => 'shield/roles', - 'show_model_path' => true, - 'cluster' => null, - 'tabs' => [ - 'pages' => true, - 'widgets' => true, - 'resources' => true, - 'custom_permissions' => false, - ], - ], - - /* - |-------------------------------------------------------------------------- - | Multi-Tenancy - |-------------------------------------------------------------------------- - | - | When your application supports teams, Shield will automatically detect - | and configure the tenant model during setup. This enables tenant-scoped - | roles and permissions throughout your application. - | - */ - - 'tenant_model' => null, - - /* - |-------------------------------------------------------------------------- - | User Model - |-------------------------------------------------------------------------- - | - | This value contains the class name of your user model. This model will - | be used for role assignments and must implement the HasRoles trait - | provided by the Spatie\Permission package. - | - */ - - 'auth_provider_model' => 'App\\Models\\User', - - /* - |-------------------------------------------------------------------------- - | Super Admin - |-------------------------------------------------------------------------- - | - | Here you may define a super admin that has unrestricted access to your - | application. You can choose to implement this via Laravel's gate system - | or as a traditional role with all permissions explicitly assigned. - | - */ - - 'super_admin' => [ - 'enabled' => true, - 'name' => 'super_admin', - 'define_via_gate' => false, - 'intercept_gate' => 'before', - ], - - /* - |-------------------------------------------------------------------------- - | Panel User - |-------------------------------------------------------------------------- - | - | When enabled, Shield will create a basic panel user role that can be - | assigned to users who should have access to your Filament panels but - | don't need any specific permissions beyond basic authentication. - | - */ - - 'panel_user' => [ - 'enabled' => true, - 'name' => 'panel_user', - ], - - /* - |-------------------------------------------------------------------------- - | Permission Builder - |-------------------------------------------------------------------------- - | - | You can customize how permission keys are generated to match your - | preferred naming convention and organizational standards. Shield uses - | these settings when creating permission names from your resources. - | - | Supported formats: snake, kebab, pascal, camel, upper_snake, lower_snake - | - */ - - 'permissions' => [ - 'separator' => ':', - 'case' => 'pascal', - 'generate' => true, - ], - - /* - |-------------------------------------------------------------------------- - | Policies - |-------------------------------------------------------------------------- - | - | Shield can automatically generate Laravel policies for your resources. - | When merge is enabled, the methods below will be combined with any - | resource-specific methods you define in the resources section. - | - */ - - 'policies' => [ - 'path' => app_path('Policies'), - 'merge' => true, - 'generate' => true, - 'methods' => [ - 'viewAny', 'view', 'create', 'update', 'delete', 'restore', - 'forceDelete', 'forceDeleteAny', 'restoreAny', 'replicate', 'reorder', - ], - 'single_parameter_methods' => [ - 'viewAny', - 'create', - 'deleteAny', - 'forceDeleteAny', - 'restoreAny', - 'reorder', - ], - ], - - /* - |-------------------------------------------------------------------------- - | Localization - |-------------------------------------------------------------------------- - | - | Shield supports multiple languages out of the box. When enabled, you - | can provide translated labels for permissions to create a more - | localized experience for your international users. - | - */ - - 'localization' => [ - 'enabled' => false, - 'key' => 'filament-shield::filament-shield', - ], - - /* - |-------------------------------------------------------------------------- - | Resources - |-------------------------------------------------------------------------- - | - | Here you can fine-tune permissions for specific Filament resources. - | Use the 'manage' array to override the default policy methods for - | individual resources, giving you granular control over permissions. - | - */ - - 'resources' => [ - 'subject' => 'model', - 'manage' => [ - \BezhanSalleh\FilamentShield\Resources\Roles\RoleResource::class => [ - 'viewAny', - 'view', - 'create', - 'update', - 'delete', - ], - ], - 'exclude' => [ - // - ], - ], - - /* - |-------------------------------------------------------------------------- - | Pages - |-------------------------------------------------------------------------- - | - | Most Filament pages only require view permissions. Pages listed in the - | exclude array will be skipped during permission generation and won't - | appear in your role management interface. - | - */ - - 'pages' => [ - 'subject' => 'class', - 'prefix' => 'view', - 'exclude' => [ - \Filament\Pages\Dashboard::class, - ], - ], - - /* - |-------------------------------------------------------------------------- - | Widgets - |-------------------------------------------------------------------------- - | - | Like pages, widgets typically only need view permissions. Add widgets - | to the exclude array if you don't want them to appear in your role - | management interface. - | - */ - - 'widgets' => [ - 'subject' => 'class', - 'prefix' => 'view', - 'exclude' => [ - \Filament\Widgets\AccountWidget::class, - \Filament\Widgets\FilamentInfoWidget::class, - ], - ], - - /* - |-------------------------------------------------------------------------- - | Custom Permissions - |-------------------------------------------------------------------------- - | - | Sometimes you need permissions that don't map to resources, pages, or - | widgets. Define any custom permissions here and they'll be available - | when editing roles in your application. - | - */ - - 'custom_permissions' => [], - - /* - |-------------------------------------------------------------------------- - | Entity Discovery - |-------------------------------------------------------------------------- - | - | By default, Shield only looks for entities in your default Filament - | panel. Enable these options if you're using multiple panels and want - | Shield to discover entities across all of them. - | - */ - - 'discovery' => [ - 'discover_all_resources' => false, - 'discover_all_widgets' => false, - 'discover_all_pages' => false, - ], - - /* - |-------------------------------------------------------------------------- - | Role Policy - |-------------------------------------------------------------------------- - | - | Shield can automatically register a policy for role management itself. - | This lets you control who can manage roles using Laravel's built-in - | authorization system. Requires a RolePolicy class in your app. - | - */ - - 'register_role_policy' => true, - -]; diff --git a/database/migrations/2023_08_06_085243_create_supervisor_table.php b/database/migrations/2023_08_06_085243_create_supervisor_table.php index e001eb0f..d487dbe3 100644 --- a/database/migrations/2023_08_06_085243_create_supervisor_table.php +++ b/database/migrations/2023_08_06_085243_create_supervisor_table.php @@ -14,18 +14,14 @@ return new class extends Migration Schema::create('supervisors', function (Blueprint $table) { $table->id(); $table->string('name'); - $table->string('type'); - $table->string('filetype')->default('json'); - $table->integer('provider_id')->default(0); $table->integer('sport_id')->default(0)->nullable(); - $table->integer('bookmaker_id')->default(0)->nullable(); $table->integer('sleep')->default(10); $table->integer('limit')->default(0); $table->string('runtime')->nullable(); - $table->integer('events')->default(0); + $table->integer('maxsconds')->default(30); $table->integer('lastcall')->default(0); $table->boolean('is_cron')->default(0); diff --git a/database/migrations/2024_11_08_053426_create_odds_3ways_table.php b/database/migrations/2024_11_08_053426_create_odds_3ways_table.php index f93c7d29..0fa2a1e3 100644 --- a/database/migrations/2024_11_08_053426_create_odds_3ways_table.php +++ b/database/migrations/2024_11_08_053426_create_odds_3ways_table.php @@ -15,7 +15,6 @@ return new class extends Migration $table->id(); $table->foreignId('event_id')->constrained()->cascadeOnDelete(); $table->integer('sport_id')->default(0); - $table->integer('matchpart_id')->default(0); $table->integer('bookmaker_id')->default(0); $table->integer('offer_id')->default(0); $table->decimal('h3w', 7, 3)->default(0); @@ -24,8 +23,7 @@ return new class extends Migration $table->decimal('margin', 5, 1)->default(0); $table->boolean('flag')->default(0); $table->boolean('check')->default(0); - $table->timestamp('book_startime'); - $table->timestamp('nuh_last_check'); + $table->timestamp('last_check_at'); $table->timestamp('source_updated_at'); $table->timestamps(); $table->index(['event_id']); diff --git a/database/migrations/2024_11_08_053430_create_odds_2ways_table.php b/database/migrations/2024_11_08_053430_create_odds_2ways_table.php index 05e34de2..01b06abe 100644 --- a/database/migrations/2024_11_08_053430_create_odds_2ways_table.php +++ b/database/migrations/2024_11_08_053430_create_odds_2ways_table.php @@ -15,7 +15,6 @@ return new class extends Migration $table->id(); $table->foreignId('event_id')->constrained()->cascadeOnDelete(); $table->integer('sport_id')->default(0); - $table->integer('matchpart_id')->default(0); $table->integer('bookmaker_id')->default(0); $table->integer('offer_id')->default(0); $table->decimal('h2w', 7, 3)->default(0); @@ -23,8 +22,8 @@ return new class extends Migration $table->decimal('margin', 5, 1)->default(0); $table->boolean('flag')->default(0); $table->boolean('check')->default(0); - $table->timestamp('last_check'); - $table->timestamp('source_updated'); + $table->timestamp('last_check_at'); + $table->timestamp('source_updated_at'); $table->timestamps(); $table->index(['event_id']); $table->index(['sport_id']); diff --git a/database/migrations/2024_11_08_053430_create_odds_dc_table.php b/database/migrations/2024_11_08_053430_create_odds_dc_table.php index d8072254..78d9276d 100644 --- a/database/migrations/2024_11_08_053430_create_odds_dc_table.php +++ b/database/migrations/2024_11_08_053430_create_odds_dc_table.php @@ -15,7 +15,6 @@ return new class extends Migration $table->id(); $table->foreignId('event_id')->constrained()->cascadeOnDelete(); $table->integer('sport_id')->default(0); - $table->integer('matchpart_id')->default(0); $table->integer('bookmaker_id')->default(0); $table->integer('offer_id')->default(0); $table->decimal('dc1x', 7, 3)->default(0); @@ -24,8 +23,8 @@ return new class extends Migration $table->decimal('margin', 5, 1)->default(0); $table->boolean('flag')->default(0); $table->boolean('check')->default(0); - $table->timestamp('last_check'); - $table->timestamp('source_updated'); + $table->timestamp('last_check_at'); + $table->timestamp('source_updated_at'); $table->timestamps(); $table->index(['event_id']); $table->index(['sport_id']); diff --git a/database/migrations/2024_11_08_053430_create_odds_dnb_table.php b/database/migrations/2024_11_08_053430_create_odds_dnb_table.php index 596324da..c66ec8f4 100644 --- a/database/migrations/2024_11_08_053430_create_odds_dnb_table.php +++ b/database/migrations/2024_11_08_053430_create_odds_dnb_table.php @@ -15,7 +15,6 @@ return new class extends Migration $table->id(); $table->foreignId('event_id')->constrained()->cascadeOnDelete(); $table->integer('sport_id')->default(0); - $table->integer('matchpart_id')->default(0); $table->integer('bookmaker_id')->default(0); $table->integer('offer_id')->default(0); $table->decimal('dnb1', 7, 3)->default(0); @@ -23,8 +22,8 @@ return new class extends Migration $table->decimal('margin', 5, 1)->default(0); $table->boolean('flag')->default(0); $table->boolean('check')->default(0); - $table->timestamp('last_check'); - $table->timestamp('source_updated'); + $table->timestamp('last_check_at'); + $table->timestamp('source_updated_at'); $table->timestamps(); $table->index(['event_id']); $table->index(['sport_id']); diff --git a/database/migrations/2024_11_08_053430_create_odds_ggng_table.php b/database/migrations/2024_11_08_053430_create_odds_ggng_table.php index 07c152fe..9fd1374e 100644 --- a/database/migrations/2024_11_08_053430_create_odds_ggng_table.php +++ b/database/migrations/2024_11_08_053430_create_odds_ggng_table.php @@ -15,7 +15,6 @@ return new class extends Migration $table->id(); $table->foreignId('event_id')->constrained()->cascadeOnDelete(); $table->integer('sport_id')->default(0); - $table->integer('matchpart_id')->default(0); $table->integer('bookmaker_id')->default(0); $table->integer('offer_id')->default(0); $table->decimal('gg', 7, 3)->default(0); @@ -23,8 +22,8 @@ return new class extends Migration $table->decimal('margin', 5, 1)->default(0); $table->boolean('flag')->default(0); $table->boolean('check')->default(0); - $table->timestamp('last_check'); - $table->timestamp('source_updated'); + $table->timestamp('last_check_at'); + $table->timestamp('source_updated_at'); $table->timestamps(); $table->index(['event_id']); $table->index(['sport_id']); diff --git a/database/migrations/2024_11_08_053430_create_odds_qualify_table.php b/database/migrations/2024_11_08_053430_create_odds_qualify_table.php index 1fc9964b..05a20339 100644 --- a/database/migrations/2024_11_08_053430_create_odds_qualify_table.php +++ b/database/migrations/2024_11_08_053430_create_odds_qualify_table.php @@ -15,7 +15,6 @@ return new class extends Migration $table->id(); $table->foreignId('event_id')->constrained()->cascadeOnDelete(); $table->integer('sport_id')->default(0); - $table->integer('matchpart_id')->default(0); $table->integer('bookmaker_id')->default(0); $table->integer('offer_id')->default(0); $table->decimal('htq', 7, 3)->default(0); @@ -23,8 +22,8 @@ return new class extends Migration $table->decimal('margin', 5, 1)->default(0); $table->boolean('flag')->default(0); $table->boolean('check')->default(0); - $table->timestamp('last_check'); - $table->timestamp('source_updated'); + $table->timestamp('last_check_at'); + $table->timestamp('source_updated_at'); $table->timestamps(); $table->index(['event_id']); $table->index(['sport_id']); diff --git a/database/migrations/2024_11_08_053439_create_odds_handicaps_table.php b/database/migrations/2024_11_08_053439_create_odds_handicaps_table.php index 44b0a0ca..e62868d7 100644 --- a/database/migrations/2024_11_08_053439_create_odds_handicaps_table.php +++ b/database/migrations/2024_11_08_053439_create_odds_handicaps_table.php @@ -15,7 +15,6 @@ return new class extends Migration $table->id(); $table->foreignId('event_id')->constrained()->cascadeOnDelete(); $table->integer('sport_id')->default(0); - $table->integer('matchpart_id')->default(0); $table->integer('bookmaker_id')->default(0); $table->integer('offer_id')->default(0); $table->decimal('home', 7, 3)->default(0); @@ -24,8 +23,8 @@ return new class extends Migration $table->decimal('margin', 5, 1)->default(0); $table->boolean('flag')->default(0); $table->boolean('check')->default(0); - $table->timestamp('last_check'); - $table->timestamp('source_updated'); + $table->timestamp('last_check_at'); + $table->timestamp('source_updated_at'); $table->timestamps(); $table->index(['event_id']); $table->index(['sport_id']); diff --git a/database/migrations/2024_11_08_053445_create_odds_totals_table.php b/database/migrations/2024_11_08_053445_create_odds_totals_table.php index 3ecb7442..d91623e8 100644 --- a/database/migrations/2024_11_08_053445_create_odds_totals_table.php +++ b/database/migrations/2024_11_08_053445_create_odds_totals_table.php @@ -15,7 +15,6 @@ return new class extends Migration $table->id(); $table->foreignId('event_id')->constrained()->cascadeOnDelete(); $table->integer('sport_id')->default(0); - $table->integer('matchpart_id')->default(0); $table->integer('bookmaker_id')->default(0); $table->integer('offer_id')->default(0); $table->decimal('over', 7, 3)->default(0); @@ -24,8 +23,8 @@ return new class extends Migration $table->decimal('margin', 5, 1)->default(0); $table->boolean('flag')->default(0); $table->boolean('check')->default(0); - $table->timestamp('last_check'); - $table->timestamp('source_updated'); + $table->timestamp('last_check_at'); + $table->timestamp('source_updated_at'); $table->timestamps(); $table->index(['event_id']); $table->index(['sport_id']); diff --git a/database/migrations/2025_08_14_062056_create_permission_tables.php b/database/migrations/2025_08_14_062056_create_permission_tables.php deleted file mode 100644 index 66ce1f97..00000000 --- a/database/migrations/2025_08_14_062056_create_permission_tables.php +++ /dev/null @@ -1,134 +0,0 @@ -engine('InnoDB'); - $table->bigIncrements('id'); // permission id - $table->string('name'); // For MyISAM use string('name', 225); // (or 166 for InnoDB with Redundant/Compact row format) - $table->string('guard_name'); // For MyISAM use string('guard_name', 25); - $table->timestamps(); - - $table->unique(['name', 'guard_name']); - }); - - Schema::create($tableNames['roles'], static function (Blueprint $table) use ($teams, $columnNames) { - // $table->engine('InnoDB'); - $table->bigIncrements('id'); // role id - if ($teams || config('permission.testing')) { // permission.testing is a fix for sqlite testing - $table->unsignedBigInteger($columnNames['team_foreign_key'])->nullable(); - $table->index($columnNames['team_foreign_key'], 'roles_team_foreign_key_index'); - } - $table->string('name'); // For MyISAM use string('name', 225); // (or 166 for InnoDB with Redundant/Compact row format) - $table->string('guard_name'); // For MyISAM use string('guard_name', 25); - $table->timestamps(); - if ($teams || config('permission.testing')) { - $table->unique([$columnNames['team_foreign_key'], 'name', 'guard_name']); - } else { - $table->unique(['name', 'guard_name']); - } - }); - - Schema::create($tableNames['model_has_permissions'], static function (Blueprint $table) use ($tableNames, $columnNames, $pivotPermission, $teams) { - $table->unsignedBigInteger($pivotPermission); - - $table->string('model_type'); - $table->unsignedBigInteger($columnNames['model_morph_key']); - $table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_permissions_model_id_model_type_index'); - - $table->foreign($pivotPermission) - ->references('id') // permission id - ->on($tableNames['permissions']) - ->onDelete('cascade'); - if ($teams) { - $table->unsignedBigInteger($columnNames['team_foreign_key']); - $table->index($columnNames['team_foreign_key'], 'model_has_permissions_team_foreign_key_index'); - - $table->primary([$columnNames['team_foreign_key'], $pivotPermission, $columnNames['model_morph_key'], 'model_type'], - 'model_has_permissions_permission_model_type_primary'); - } else { - $table->primary([$pivotPermission, $columnNames['model_morph_key'], 'model_type'], - 'model_has_permissions_permission_model_type_primary'); - } - - }); - - Schema::create($tableNames['model_has_roles'], static function (Blueprint $table) use ($tableNames, $columnNames, $pivotRole, $teams) { - $table->unsignedBigInteger($pivotRole); - - $table->string('model_type'); - $table->unsignedBigInteger($columnNames['model_morph_key']); - $table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_roles_model_id_model_type_index'); - - $table->foreign($pivotRole) - ->references('id') // role id - ->on($tableNames['roles']) - ->onDelete('cascade'); - if ($teams) { - $table->unsignedBigInteger($columnNames['team_foreign_key']); - $table->index($columnNames['team_foreign_key'], 'model_has_roles_team_foreign_key_index'); - - $table->primary([$columnNames['team_foreign_key'], $pivotRole, $columnNames['model_morph_key'], 'model_type'], - 'model_has_roles_role_model_type_primary'); - } else { - $table->primary([$pivotRole, $columnNames['model_morph_key'], 'model_type'], - 'model_has_roles_role_model_type_primary'); - } - }); - - Schema::create($tableNames['role_has_permissions'], static function (Blueprint $table) use ($tableNames, $pivotRole, $pivotPermission) { - $table->unsignedBigInteger($pivotPermission); - $table->unsignedBigInteger($pivotRole); - - $table->foreign($pivotPermission) - ->references('id') // permission id - ->on($tableNames['permissions']) - ->onDelete('cascade'); - - $table->foreign($pivotRole) - ->references('id') // role id - ->on($tableNames['roles']) - ->onDelete('cascade'); - - $table->primary([$pivotPermission, $pivotRole], 'role_has_permissions_permission_id_role_id_primary'); - }); - - app('cache') - ->store(config('permission.cache.store') != 'default' ? config('permission.cache.store') : null) - ->forget(config('permission.cache.key')); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - $tableNames = config('permission.table_names'); - - throw_if(empty($tableNames), Exception::class, 'Error: config/permission.php not found and defaults could not be merged. Please publish the package configuration before proceeding, or drop the tables manually.'); - - Schema::drop($tableNames['role_has_permissions']); - Schema::drop($tableNames['model_has_roles']); - Schema::drop($tableNames['model_has_permissions']); - Schema::drop($tableNames['roles']); - Schema::drop($tableNames['permissions']); - } -}; diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index eadbaad4..32dec699 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -12,7 +12,7 @@ class DatabaseSeeder extends Seeder public function run(): void { $this->call([ - RolesAndPermissionsSeeder::class, + UserSeeder::class, ProvoiderSeeder::class, ClientsSeeder::class, BookmakerSeeder::class, diff --git a/database/seeders/ProvoiderSeeder.php b/database/seeders/ProvoiderSeeder.php index c2ee4267..1656e8d2 100644 --- a/database/seeders/ProvoiderSeeder.php +++ b/database/seeders/ProvoiderSeeder.php @@ -12,11 +12,15 @@ class ProvoiderSeeder extends Seeder /** * Provoider */ - $sql = "INSERT INTO `providers` (`id`, `name`) + $sql = "INSERT INTO `providers` (`id`, `name`, `created_at`, `updated_at`) VALUES - ('1', 'TxOdds'), - ('2', 'BetsApi'), - ('3', 'Direct'); + ('1', 'DIRECT', NULL, NULL), + ('2', 'TXODDS', NULL, NULL), + ('3', 'BETSAPI', NULL, NULL), + ('4', 'MAGLOO KENIA', NULL, NULL), + ('5', 'MAGLOO NIGERIA', NULL, NULL), + ('6', 'LOGIFUTUR NIGERA', NULL, NULL), + ('7', 'LOGIFUTUR COLOMBIA', NULL, NULL); "; DB::unprepared($sql); diff --git a/database/seeders/RolesAndPermissionsSeeder.php b/database/seeders/RolesAndPermissionsSeeder.php deleted file mode 100644 index bb5aab34..00000000 --- a/database/seeders/RolesAndPermissionsSeeder.php +++ /dev/null @@ -1,49 +0,0 @@ -upsert( - [ - ['name' => 'user', 'guard_name' => 'web'], - ['name' => 'administrator', 'guard_name' => 'web'], - ], - ['name'] - ); - - $user = User::factory()->create([ - 'name' => 'Hermann Telser', - 'email' => 'ht@webwerkstatt.tirol', - 'password' => Hash::make('salam'), - 'email_verified_at' => now(), - 'client_id' => 1, - ]); - $user->assignRole('super_admin'); - - $user = User::factory()->create([ - 'name' => 'Ubaldo Perrucci', - 'email' => 'ubaldo.perrucci@gmail.com', - 'password' => Hash::make('oscar'), - 'email_verified_at' => now(), - 'client_id' => 1, - ]); - $user->assignRole('administrator'); - - $user = User::factory()->create([ - 'name' => 'Renato Rossi', - 'email' => 'rr@uta.it', - 'password' => Hash::make('salam'), - 'email_verified_at' => now(), - 'client_id' => 1, - ]); - $user->assignRole('user'); - } -} diff --git a/database/seeders/SupervisorSeeder.php b/database/seeders/SupervisorSeeder.php index 8a81d03d..092bd0c4 100644 --- a/database/seeders/SupervisorSeeder.php +++ b/database/seeders/SupervisorSeeder.php @@ -12,9 +12,11 @@ class SupervisorSeeder extends Seeder /** * Supervisor */ - $sql = "INSERT INTO `supervisors` (`id`, `name`, `type`, `provider_id`, `sport_id`, `bookmaker_id`, `sleep`, `limit`, `runtime`, `events`, `lastcall`, `is_cron`, `is_active`, `created_at`, `updated_at`) + $sql = "INSERT INTO `supervisors` (`id`, `name`, `provider_id`, `sport_id`, `sleep`, `limit`, `runtime`, `maxsconds`, `lastcall`, `is_cron`, `is_active`, `created_at`, `updated_at`) VALUES - ('1', 'Fixtures Soccer', 'Grapper', '1', '1', NULL, '10', '0', NULL, '0', '0', '1', '0', '2025-08-27 07:39:55', '2025-08-27 07:39:55');"; + ('1', 'Fixtures', '2', '1', '10', '0', NULL, '1800', '0', '1', '1', '2025-08-27 07:39:55', '2025-12-01 05:07:21'), + ('2', 'Odds', '2', '1', '10', '0', NULL, '30', '0', '0', '0', '2025-12-01 05:41:02', '2025-12-01 05:41:02'); + "; DB::unprepared($sql); } diff --git a/database/seeders/UserSeeder.php b/database/seeders/UserSeeder.php new file mode 100644 index 00000000..69e27cdc --- /dev/null +++ b/database/seeders/UserSeeder.php @@ -0,0 +1,31 @@ +create([ + 'name' => 'Hermann Telser', + 'email' => 'ht@webwerkstatt.tirol', + 'password' => Hash::make('salam'), + 'email_verified_at' => now(), + 'super_admin' => 1, + 'client_id' => 1, + ]); + + User::factory()->create([ + 'name' => 'Ubaldo Perrucci', + 'email' => 'ubaldo.perrucci@gmail.com', + 'password' => Hash::make('oscar'), + 'email_verified_at' => now(), + 'client_id' => 1, + ]); + } +} diff --git a/setup.sh b/setup.sh index 1535fbb8..77b5aa04 100755 --- a/setup.sh +++ b/setup.sh @@ -4,12 +4,11 @@ case "$1" in "1") git pull composer update + npm update php artisan optimize - php artisan storage:link ;; "2") php artisan migrate:fresh --force - php artisan shield:generate --all php artisan db:seed --force php artisan optimize:clear php artisan optimize @@ -31,21 +30,17 @@ case "$1" in "6") php artisan filament:assets ;; -"7") - php artisan shield:generate --all - ;; *) echo "" echo "--------------------------" echo "setup nuh lives" echo "--------------------------" - echo "1 => git pull & composer update & optimize" - echo "2 => a db fresh & seed" - echo "3 => a cache & storage" + echo "1 => git pull, composer update, npm update, optimize" + echo "2 => db fresh & seed" + echo "3 => cache, optimize & storage" echo "4 => chown -R apache:apache ." echo "5 => a storage:link" echo "6 => a filament:assets -> copy to prod" - echo "7 => a shield:generate --all -> recreate all policies" echo "--------------------------" echo "" ;;