mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 10:10:48 +01:00
fix: skin duplicate bug
This commit is contained in:
@@ -59,12 +59,9 @@ class ChampionSkin extends Model
|
|||||||
return $this->hasMany(SkinChroma::class, 'full_skin_id', 'full_skin_id');
|
return $this->hasMany(SkinChroma::class, 'full_skin_id', 'full_skin_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSkinImageAttribute(bool $pbe = false): string
|
public function getSkinImageAttribute(): string
|
||||||
{
|
{
|
||||||
if ($pbe) {
|
return 'https://raw.communitydragon.org/pbe/plugins/rcp-be-lol-game-data/global/default/v1/champion-splashes/' . $this->champion_id . '/' . $this->full_skin_id . '.jpg';
|
||||||
return 'https://raw.communitydragon.org/pbe/plugins/rcp-be-lol-game-data/global/default/v1/champion-splashes/' . $this->champion_id . '/' . $this->full_skin_id . '.jpg';
|
|
||||||
}
|
|
||||||
return 'https://cdn.communitydragon.org/latest/champion/' . $this->champion_id . '/splash-art/centered/skin/' . $this->skin_id;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSkinImageLoadingAttribute(): string
|
public function getSkinImageLoadingAttribute(): string
|
||||||
|
|||||||
20
config/image.php
Normal file
20
config/image.php
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Image Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Intervention Image supports "GD Library" and "Imagick" to process images
|
||||||
|
| internally. You may choose one of them according to your PHP
|
||||||
|
| configuration. By default PHP's "GD Library" implementation is used.
|
||||||
|
|
|
||||||
|
| Supported: "gd", "imagick"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'driver' => 'gd'
|
||||||
|
|
||||||
|
];
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
@vite('resources/js/app.js')
|
@vite('resources/js/app.js')
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="antialiased bg-stone-900 dark">
|
<body class="antialiased bg-stone-900 dark scroll-smooth">
|
||||||
<x-navbar/>
|
<x-navbar/>
|
||||||
<x-champions.list_all :champions="$champions" :roles="$roles"/>
|
<x-champions.list_all :champions="$champions" :roles="$roles"/>
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,8 @@
|
|||||||
<!-- OpenGraph -->
|
<!-- OpenGraph -->
|
||||||
<meta property="og:site_name" content="Heimerdinger.LoL">
|
<meta property="og:site_name" content="Heimerdinger.LoL">
|
||||||
<meta property="og:title" content="{{$champion->name}} • Heimerdinger.LoL">
|
<meta property="og:title" content="{{$champion->name}} • Heimerdinger.LoL">
|
||||||
<meta property="og:description" content="Heimerdinger.LoL: {{$champion->name}} details showing all the information you need to know about {{$champion->name}}, {{$champion->title}}. {{substr($champion->lore, 0, 50)}}...">
|
<meta property="og:description"
|
||||||
|
content="Heimerdinger.LoL: {{$champion->name}} details showing all the information you need to know about {{$champion->name}}, {{$champion->title}}. {{substr($champion->lore, 0, 50)}}...">
|
||||||
<meta property="og:locale" content="en">
|
<meta property="og:locale" content="en">
|
||||||
<meta property="og:type" content="website">
|
<meta property="og:type" content="website">
|
||||||
<meta property="og:image" content="{{asset('img/og_image.png')}}">
|
<meta property="og:image" content="{{asset('img/og_image.png')}}">
|
||||||
@@ -32,7 +33,8 @@
|
|||||||
<meta name="twitter:card" content="summary_large_image">
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
<meta property="twitter:domain" content="heimerdinger.lol">
|
<meta property="twitter:domain" content="heimerdinger.lol">
|
||||||
<meta property="twitter:title" content="{{$champion->name}} • Heimerdinger.LoL">
|
<meta property="twitter:title" content="{{$champion->name}} • Heimerdinger.LoL">
|
||||||
<meta property="twitter:description" content="Heimerdinger.LoL: {{$champion->name}} details showing all the information you need to know about {{$champion->name}}, {{$champion->title}}. {{substr($champion->lore, 0, 50)}}...">
|
<meta property="twitter:description"
|
||||||
|
content="Heimerdinger.LoL: {{$champion->name}} details showing all the information you need to know about {{$champion->name}}, {{$champion->title}}. {{substr($champion->lore, 0, 50)}}...">
|
||||||
<meta property="twitter:image" content="{{asset('img/og_image.png')}}">
|
<meta property="twitter:image" content="{{asset('img/og_image.png')}}">
|
||||||
|
|
||||||
<link rel="preconnect" href="https://rsms.me/">
|
<link rel="preconnect" href="https://rsms.me/">
|
||||||
@@ -42,12 +44,11 @@
|
|||||||
@vite('resources/js/app.js')
|
@vite('resources/js/app.js')
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="antialiased bg-stone-900 dark">
|
<body class="antialiased bg-stone-900 dark scroll-smooth">
|
||||||
<x-navbar/>
|
<x-navbar/>
|
||||||
<x-champions.grid_info :champion="$champion"/>
|
<x-champions.grid_info :champion="$champion"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<div class="flex flex-col items-center justify-center">
|
<div class="flex flex-col items-center justify-center">
|
||||||
<img loading="lazy" class="border-2 border-orange-400/40 rounded-xl"
|
<img loading="lazy" class="border-2 border-orange-400/40 rounded-xl"
|
||||||
src="{{ $skin->getSkinImageAttribute(true) }}"
|
src="{{ $skin->getSkinImageAttribute() }}"
|
||||||
alt="{{ $skin->skin_name }} Splash Art">
|
alt="{{ $skin->skin_name }} Splash Art">
|
||||||
<div class="flex flex-col items-center justify-center">
|
<div class="flex flex-col items-center justify-center">
|
||||||
<h2 class="mt-4 text-xl font-bold text-white">{{ $skin->skin_name }}</h2>
|
<h2 class="mt-4 text-xl font-bold text-white">{{ $skin->skin_name }}</h2>
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
@vite('resources/js/app.js')
|
@vite('resources/js/app.js')
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="antialiased bg-stone-800 dark">
|
<body class="antialiased bg-stone-800 dark scroll-smooth">
|
||||||
<x-navbar/>
|
<x-navbar/>
|
||||||
<x-home.features/>
|
<x-home.features/>
|
||||||
@if ($upcomingSkins != [])
|
@if ($upcomingSkins != [])
|
||||||
|
|||||||
Reference in New Issue
Block a user