🧹 Duster

This commit is contained in:
Rico van Zelst
2024-06-18 12:55:10 +02:00
parent f3ded81a62
commit a0b37a4ab4
39 changed files with 191 additions and 232 deletions

View File

@@ -72,7 +72,6 @@ function getRoleIconSvg($roleName): string
*
* @param string $full_id
* @param enum $type splash, uncentered_splash, loading, tile, icon, ability, video
* @return string
*/
function getChampionImage($full_id, $type): string
{
@@ -85,6 +84,9 @@ function getChampionImage($full_id, $type): string
return $championImage->url;
}
/**
* Get the commit hash.
*/
function getCommitHash(): string
{
/** @var string $commit */

View File

@@ -29,13 +29,6 @@ class Champion extends Model
'release_patch',
];
protected function casts(): array
{
return [
'roles' => 'array',
];
}
public function getResourceTypeAttribute($value): string
{
$resourceTypes = [
@@ -139,4 +132,11 @@ class Champion extends Model
{
return 'https://cdn.communitydragon.org/latest/champion/'.$this->champion_id.'/ability-icon/p';
}
protected function casts(): array
{
return [
'roles' => 'array',
];
}
}

View File

@@ -16,13 +16,6 @@ class ChampionRoles extends Model
'roles',
];
protected function casts(): array
{
return [
'roles' => 'array',
];
}
public function champion(): BelongsTo
{
return $this->belongsTo(Champion::class, 'champion_id', 'champion_id');
@@ -50,4 +43,11 @@ class ChampionRoles extends Model
return $transformedRoles;
}
protected function casts(): array
{
return [
'roles' => 'array',
];
}
}

View File

@@ -34,15 +34,6 @@ class ChampionSkin extends Model
'splash_artist',
];
protected function casts(): array
{
return [
'associated_skinline' => 'array',
'voice_actor' => 'array',
'splash_artist' => 'array',
];
}
public function sluggable(): array
{
return [
@@ -86,4 +77,13 @@ class ChampionSkin extends Model
{
return 'https://cdn.communitydragon.org/latest/champion/'.$this->champion_id.'/tile/skin/'.$this->skin_id;
}
protected function casts(): array
{
return [
'associated_skinline' => 'array',
'voice_actor' => 'array',
'splash_artist' => 'array',
];
}
}

View File

@@ -20,13 +20,6 @@ class SkinChroma extends Model
'chroma_image',
];
protected function casts(): array
{
return [
'chroma_colors' => 'array',
];
}
public function sluggable(): array
{
return [
@@ -45,4 +38,11 @@ class SkinChroma extends Model
{
return 'https://raw.communitydragon.org/pbe/plugins/rcp-be-lol-game-data/global/default/v1/champion-chroma-images/'.$this->skin->champion_id.'/'.$this->chroma_id.'.png';
}
protected function casts(): array
{
return [
'chroma_colors' => 'array',
];
}
}

View File

@@ -22,13 +22,6 @@ class SummonerIcon extends Model
'esports_event',
];
protected function casts(): array
{
return [
'legacy' => 'boolean',
];
}
public function sluggable(): array
{
return [
@@ -49,4 +42,11 @@ class SummonerIcon extends Model
{
return 'slug';
}
protected function casts(): array
{
return [
'legacy' => 'boolean',
];
}
}

View File

@@ -8,9 +8,9 @@ use Illuminate\Http\Request;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\RateLimiter;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\ServiceProvider;
use Spatie\Sheets\Sheets;
use URL;
class AppServiceProvider extends ServiceProvider
{