From f2c390e940c1bf2c309e751fd08a59045af38f47 Mon Sep 17 00:00:00 2001 From: Rico van Zelst Date: Tue, 31 Oct 2023 09:14:58 +0100 Subject: [PATCH] style: add more informative comment --- database/seeders/ChampionSeeder.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/database/seeders/ChampionSeeder.php b/database/seeders/ChampionSeeder.php index c75776c..fa91d31 100644 --- a/database/seeders/ChampionSeeder.php +++ b/database/seeders/ChampionSeeder.php @@ -35,7 +35,8 @@ class ChampionSeeder extends Seeder 'release_patch' => $champion['releasePatch'], ]; - // Check if the champion already exists and if any attributes have changed + // Check if the champion already exists and if any attributes have changed, if so update the champion. If the champion doesn't exist, create it. + // This is to prevent the champion data from being updated every time the seeder is run. As I'll probably run this on a cron job. if ($championExists && $this->hasAttributesChanged($championExists, $championAttributes)) { $championExists->update($championAttributes); } elseif (!$championExists) {