ChampionSkin model represents a skin for a League of Legends champion, including pricing, rarity, visual features, and associated metadata.
Source: source/app/Models/ChampionSkin.php
Properties
Database Columns
Auto-incrementing primary key
Foreign key linking to the champion this skin belongs toDatabase:
integer, foreign key to champions.champion_idCascade: Deletes when parent champion is deletedMigration: source/database/migrations/2023_10_26_175822_create_champion_skins_table.php:14,33Combined champion and skin ID (e.g., champion_id=103, skin_id=8 → 103008)Database:
unsignedBigInteger, unique indexPurpose: Used as foreign key for skin chromas relationshipMigration: source/database/migrations/2023_10_26_175822_create_champion_skins_table.php:15Skin’s unique identifier within the champion (e.g., 0 for base skin, 1+ for other skins)Database:
integerMigration: source/database/migrations/2023_10_26_175822_create_champion_skins_table.php:16Display name of the skin (e.g., “K/DA ALL OUT”, “Spirit Blossom”)Database:
stringMigration: source/database/migrations/2023_10_26_175822_create_champion_skins_table.php:17Skin’s backstory and lore textDatabase:
longTextMigration: source/database/migrations/2023_10_26_175822_create_champion_skins_table.php:18Availability status (e.g., “Available”, “Legacy”, “Limited”)Database:
stringMigration: source/database/migrations/2023_10_26_175822_create_champion_skins_table.php:19Whether the skin can be obtained through loot/hextech craftingDatabase:
booleanMigration: source/database/migrations/2023_10_26_175822_create_champion_skins_table.php:20Skin price in Riot PointsDatabase:
bigIntegerMigration: source/database/migrations/2023_10_26_175822_create_champion_skins_table.php:21Skin rarity tier (e.g., “Epic”, “Legendary”, “Ultimate”)Database:
string (note: original migration has typo “raritiy”)Accessor: Converts null or “NoRarity” to “Common”Migration: source/database/migrations/2023_10_26_175822_create_champion_skins_table.php:22Model: source/app/Models/ChampionSkin.php:51-54Skin’s release dateDatabase:
stringMigration: source/database/migrations/2023_10_26_175822_create_champion_skins_table.php:23Array of associated skin line/theme names (e.g., [“K/DA”, “Prestige”])Database:
jsonCasted to: array - automatically serialized/deserializedMigration: source/database/migrations/2023_10_26_175822_create_champion_skins_table.php:24Model: source/app/Models/ChampionSkin.php:84Whether the skin has new visual effectsDatabase:
booleanMigration: source/database/migrations/2023_10_26_175822_create_champion_skins_table.php:25Whether the skin has new animationsDatabase:
booleanMigration: source/database/migrations/2023_10_26_175822_create_champion_skins_table.php:26Whether the skin has a new recall animationDatabase:
booleanMigration: source/database/migrations/2023_10_26_175822_create_champion_skins_table.php:27Whether the skin has new voice processing/filterDatabase:
booleanMigration: source/database/migrations/2023_10_26_175822_create_champion_skins_table.php:28Whether the skin has new voice lines/quotesDatabase:
booleanMigration: source/database/migrations/2023_10_26_175822_create_champion_skins_table.php:29Array of voice actor names for this skinDatabase:
jsonCasted to: array - automatically serialized/deserializedMigration: source/database/migrations/2023_10_26_175822_create_champion_skins_table.php:30Model: source/app/Models/ChampionSkin.php:85Array of splash art artist namesDatabase:
jsonCasted to: array - automatically serialized/deserializedMigration: source/database/migrations/2023_10_26_175822_create_champion_skins_table.php:31Model: source/app/Models/ChampionSkin.php:86URL-friendly slug generated from skin name (used for routing)Database:
string, unique index, nullableAuto-generated: Uses Sluggable trait to generate from skin_name fieldMigration: source/database/migrations/2023_11_01_140156_add_slug_to_champion_skins.php:12Model: source/app/Models/ChampionSkin.php:37-49Record creation timestamp
Record last update timestamp
Relationships
champion()
Returns the champion that owns this skin. Type:BelongsTo
Related Model: Champion
Foreign Key: champion_id
Source: source/app/Models/ChampionSkin.php:56-59
chromas()
Returns all chromas (color variants) for this skin. Type:HasMany
Related Model: SkinChroma
Foreign Key: full_skin_id
Source: source/app/Models/ChampionSkin.php:61-64
Accessors & Methods
getRarityAttribute($value)
Mutator that converts null or “NoRarity” values to “Common”. Source:source/app/Models/ChampionSkin.php:51-54
Returns: string
getSkinImageAttribute($uncentered = false)
Returns the skin’s splash art image URL. Source:source/app/Models/ChampionSkin.php:66-69
Parameters:
$uncentered(bool): Whether to return uncentered splash art
string - Image URL
getSkinImageLoadingAttribute()
Returns the skin’s loading screen portrait image URL from Community Dragon. Source:source/app/Models/ChampionSkin.php:71-74
Returns: string - Loading screen image URL
getSkinImageTileAttribute()
Returns the skin’s tile image URL from Community Dragon. Source:source/app/Models/ChampionSkin.php:76-79
Returns: string - Tile image URL
getRouteKeyName()
Specifies that routes should use theslug field instead of id.
Source: source/app/Models/ChampionSkin.php:46-49
Returns: string - “slug”
Traits
HasFactory
Enables model factory support for testing and seeding. Source:source/app/Models/ChampionSkin.php:13
Sluggable
Automatically generates URL-friendly slugs from the skin name. Source:source/app/Models/ChampionSkin.php:14, 37-44
Configuration:
Fillable Attributes
The following attributes are mass-assignable: Source:source/app/Models/ChampionSkin.php:16-35
champion_idfull_skin_idskin_idskin_nameloreavailabilityloot_eligiblerp_pricerarityrelease_dateassociated_skinlinenew_effectsnew_animationsnew_recallnew_voicenew_quotesvoice_actorsplash_artist