mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 10:10:48 +01:00
24 lines
602 B
PHP
24 lines
602 B
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\Champion;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class ChampionSkinSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
$championDataUrl = "http://cdn.merakianalytics.com/riot/lol/resources/latest/en-US/champions.json";
|
|
$championData = json_decode(file_get_contents($championDataUrl), true);
|
|
|
|
foreach ($championData as $champion) {
|
|
$championId = $champion['id'];
|
|
$championExists = Champion::where('champion_id', $championId)->first();
|
|
}
|
|
}
|
|
}
|