mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 10:10:48 +01:00
🌈 Skin Chromas
This commit is contained in:
@@ -41,18 +41,23 @@ class ChampionSkin extends Model
|
||||
return $this->belongsTo(Champion::class);
|
||||
}
|
||||
|
||||
public function chromas()
|
||||
{
|
||||
return $this->hasMany(SkinChroma::class, 'full_skin_id', 'full_skin_id');
|
||||
}
|
||||
|
||||
public function getSkinImageAttribute()
|
||||
{
|
||||
return 'https://cdn.communitydragon.org/latest/champion/'.$this->champion_id.'/splash-art/centered/skin/'.$this->skin_id;
|
||||
return 'https://cdn.communitydragon.org/latest/champion/' . $this->champion_id . '/splash-art/centered/skin/' . $this->skin_id;
|
||||
}
|
||||
|
||||
public function getSkinImageLoadingAttribute()
|
||||
{
|
||||
return 'https://cdn.communitydragon.org/latest/champion/'.$this->champion_id.'/portrait/skin/'.$this->skin_id;
|
||||
return 'https://cdn.communitydragon.org/latest/champion/' . $this->champion_id . '/portrait/skin/' . $this->skin_id;
|
||||
}
|
||||
|
||||
public function getSkinImageTileAttribute()
|
||||
{
|
||||
return 'https://cdn.communitydragon.org/latest/champion/'.$this->champion_id.'/tile/skin/'.$this->skin_id;
|
||||
return 'https://cdn.communitydragon.org/latest/champion/' . $this->champion_id . '/tile/skin/' . $this->skin_id;
|
||||
}
|
||||
}
|
||||
|
||||
24
app/Models/SkinChroma.php
Normal file
24
app/Models/SkinChroma.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class SkinChroma extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'full_skin_id',
|
||||
'skin_name',
|
||||
'chroma_name',
|
||||
'chroma_colors',
|
||||
'chroma_image',
|
||||
];
|
||||
|
||||
public function skin()
|
||||
{
|
||||
return $this->belongsTo(Skin::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user