mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 10:10:48 +01:00
fix: skin foreign key
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
use Intervention\Image\ImageManagerStatic as Image;
|
||||
|
||||
function getRoleIcon($roleName)
|
||||
function getRoleIcon($roleName): string
|
||||
{
|
||||
$roleIcons = [
|
||||
'Toplane' => 'gm-top.png',
|
||||
|
||||
@@ -83,7 +83,7 @@ class Champion extends Model
|
||||
|
||||
public function skins(): HasMany
|
||||
{
|
||||
return $this->hasMany(ChampionSkin::class);
|
||||
return $this->hasMany(ChampionSkin::class, 'champion_id', 'champion_id');
|
||||
}
|
||||
|
||||
public function lanes(): HasOne
|
||||
|
||||
@@ -51,7 +51,7 @@ class ChampionSkin extends Model
|
||||
|
||||
public function champion(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Champion::class);
|
||||
return $this->belongsTo(Champion::class, 'champion_id', 'champion_id');
|
||||
}
|
||||
|
||||
public function chromas(): HasMany
|
||||
|
||||
@@ -109,8 +109,16 @@
|
||||
class="rounded-2xl border border-3 border-white/10 shadow-md
|
||||
shadow-stone-800/80 lg:col-span-2 hover:shadow-orange-500/20 transition-all duration-700"
|
||||
style="--tw-shadow-color:{{$champion->splash_color}}; --tw-shadow: var(--tw-shadow-colored); background-color: {{$champion->splash_color}};">
|
||||
3
|
||||
<div class="p-4">
|
||||
<h4 class="text-center text-xl font-semibold text-neutral-100 uppercase mt-2.5 shadow-sm">
|
||||
{{$champion->name}} Skins</h4>
|
||||
<div class="overflow-x-scroll">
|
||||
{{dd($champion->skins)}}}
|
||||
@foreach($champion->skins as $skin)
|
||||
e
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user