mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 10:10:48 +01:00
feat: Add streamers to champion show view
- Added loading of streamers data in the champion show view. - Updated ChampionController to load streamers for display.
This commit is contained in:
@@ -94,6 +94,11 @@ class Champion extends Model
|
||||
return $this->hasOne(ChampionRoles::class, 'champion_id', 'champion_id');
|
||||
}
|
||||
|
||||
public function streamers()
|
||||
{
|
||||
return $this->hasMany(Streamer::class, 'champion_id', 'champion_id');
|
||||
}
|
||||
|
||||
public function getChampionImageAttribute($centered = true): string
|
||||
{
|
||||
$url = 'https://cdn.communitydragon.org/latest/champion/'.$this->champion_id.'/splash-art';
|
||||
|
||||
Reference in New Issue
Block a user