mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 10:10:48 +01:00
fix: Update Champion image URLs from CDN Cdragon to RAW
- Refactored the Champion model to use new image URLs for different attributes. - Updated blade templates to fetch champion images with correct URLs.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user