mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 18:20:48 +01:00
fix: skin foreign key
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
use Intervention\Image\ImageManagerStatic as Image;
|
use Intervention\Image\ImageManagerStatic as Image;
|
||||||
|
|
||||||
function getRoleIcon($roleName)
|
function getRoleIcon($roleName): string
|
||||||
{
|
{
|
||||||
$roleIcons = [
|
$roleIcons = [
|
||||||
'Toplane' => 'gm-top.png',
|
'Toplane' => 'gm-top.png',
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ class Champion extends Model
|
|||||||
|
|
||||||
public function skins(): HasMany
|
public function skins(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(ChampionSkin::class);
|
return $this->hasMany(ChampionSkin::class, 'champion_id', 'champion_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function lanes(): HasOne
|
public function lanes(): HasOne
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class ChampionSkin extends Model
|
|||||||
|
|
||||||
public function champion(): BelongsTo
|
public function champion(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Champion::class);
|
return $this->belongsTo(Champion::class, 'champion_id', 'champion_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function chromas(): HasMany
|
public function chromas(): HasMany
|
||||||
|
|||||||
@@ -109,7 +109,15 @@
|
|||||||
class="rounded-2xl border border-3 border-white/10 shadow-md
|
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"
|
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}};">
|
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>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user