diff --git a/app/Models/Champion.php b/app/Models/Champion.php index 73576e5..ff5d510 100644 --- a/app/Models/Champion.php +++ b/app/Models/Champion.php @@ -99,26 +99,18 @@ class Champion extends Model return $this->hasMany(Streamer::class, 'champion_id', 'champion_id'); } - public function getChampionImageAttribute($centered = true): string + public function getChampionImageAttribute(): string { - $url = 'https://cdn.communitydragon.org/latest/champion/'.$this->champion_id.'/splash-art'; - - return $centered ? $url.'/centered' : $url; + return 'https://raw.communitydragon.org/pbe/plugins/rcp-be-lol-game-data/global/default/v1/champion-splashes/' . $this->champion_id . '/' . $this->champion_id . '000.jpg'; } - - public function getChampionImageLoadingAttribute(): string - { - return 'https://cdn.communitydragon.org/latest/champion/'.$this->champion_id.'/portrait'; - } - public function getChampionImageTileAttribute(): string { - return 'https://cdn.communitydragon.org/latest/champion/'.$this->champion_id.'/tile'; + return 'https://raw.communitydragon.org/pbe/plugins/rcp-be-lol-game-data/global/default/v1/champion-tiles/' . $this->champion_id . '/' . $this->champion_id . '000.jpg'; } public function getChampionSquareImageAttribute(): string { - return 'https://cdn.communitydragon.org/latest/champion/'.$this->champion_id.'/square'; + return 'https://raw.communitydragon.org/pbe/plugins/rcp-be-lol-game-data/global/default/v1/champion-icons/' . $this->champion_id . '.png'; } public function getChampionAbilityIconQAttribute(): string diff --git a/resources/views/components/champions/grid_info.blade.php b/resources/views/components/champions/grid_info.blade.php index d47bb64..1f68a5a 100644 --- a/resources/views/components/champions/grid_info.blade.php +++ b/resources/views/components/champions/grid_info.blade.php @@ -17,7 +17,7 @@
- - {{ $champion->name }} + + {{ $champion->name }}
{{ $champion->title }} @@ -41,30 +38,27 @@
- @foreach($roles[$key]->roles as $lane)
- {{$lane}}
+ @foreach ($roles[$key]->roles as $lane)
+ {{ $lane }}
- theme('dark')->position('bottom')->pop($lane)}}
- @if($key < 8) loading="auto" @else loading="lazy"
- @endif src="{{getRoleIcon($lane)}}"
- alt="{{$lane}} Icon"
+
theme('dark')->position('bottom')->pop($lane) }}
+ @if ($key < 8) loading="auto" @else loading="lazy" @endif
+ src="{{ getRoleIcon($lane) }}" alt="{{ $lane }} Icon"
class="mr-1 w-7 h-7">
-
-
+
+