You've already forked Atomcms-edit
Initial commit
This commit is contained in:
Executable
+34
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\GameRank;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class GameRankSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$ranks = [
|
||||
['name' => 'Brons I', 'slug' => 'bronze-1', 'icon' => '🥉', 'color' => '#cd7f32', 'min_points' => 0, 'max_points' => 99, 'tier' => 1],
|
||||
['name' => 'Brons II', 'slug' => 'bronze-2', 'icon' => '🥈🥉', 'color' => '#cd7f32', 'min_points' => 100, 'max_points' => 299, 'tier' => 2],
|
||||
['name' => 'Brons III', 'slug' => 'bronze-3', 'icon' => '🏅', 'color' => '#cd7f32', 'min_points' => 300, 'max_points' => 499, 'tier' => 3],
|
||||
['name' => 'Zilver I', 'slug' => 'silver-1', 'icon' => '🥈', 'color' => '#c0c0c0', 'min_points' => 500, 'max_points' => 799, 'tier' => 4],
|
||||
['name' => 'Zilver II', 'slug' => 'silver-2', 'icon' => '🥈🥈', 'color' => '#c0c0c0', 'min_points' => 800, 'max_points' => 999, 'tier' => 5],
|
||||
['name' => 'Zilver III', 'slug' => 'silver-3', 'icon' => '🏆', 'color' => '#c0c0c0', 'min_points' => 1000, 'max_points' => 1499, 'tier' => 6],
|
||||
['name' => 'Goud I', 'slug' => 'gold-1', 'icon' => '🥇', 'color' => '#ffd700', 'min_points' => 1500, 'max_points' => 1999, 'tier' => 7],
|
||||
['name' => 'Goud II', 'slug' => 'gold-2', 'icon' => '🥇🥇', 'color' => '#ffd700', 'min_points' => 2000, 'max_points' => 2499, 'tier' => 8],
|
||||
['name' => 'Goud III', 'slug' => 'gold-3', 'icon' => '👑', 'color' => '#ffd700', 'min_points' => 2500, 'max_points' => 2999, 'tier' => 9],
|
||||
['name' => 'Platinum', 'slug' => 'platinum', 'icon' => '💎', 'color' => '#e5e4e2', 'min_points' => 3000, 'max_points' => 3999, 'tier' => 10],
|
||||
['name' => 'Diamant I', 'slug' => 'diamond-1', 'icon' => '💠', 'color' => '#b9f2ff', 'min_points' => 4000, 'max_points' => 4999, 'tier' => 11],
|
||||
['name' => 'Diamant II', 'slug' => 'diamond-2', 'icon' => '💎💎', 'color' => '#b9f2ff', 'min_points' => 5000, 'max_points' => 5999, 'tier' => 12],
|
||||
['name' => 'Diamant III', 'slug' => 'diamond-3', 'icon' => '🔷', 'color' => '#b9f2ff', 'min_points' => 6000, 'max_points' => 7999, 'tier' => 13],
|
||||
['name' => 'Meester', 'slug' => 'master', 'icon' => '🎓', 'color' => '#9b59b6', 'min_points' => 8000, 'max_points' => 9999, 'tier' => 14],
|
||||
['name' => 'Legende', 'slug' => 'legend', 'icon' => '⚡', 'color' => '#e74c3c', 'min_points' => 10000, 'max_points' => null, 'tier' => 15],
|
||||
];
|
||||
|
||||
foreach ($ranks as $rank) {
|
||||
GameRank::updateOrCreate(['slug' => $rank['slug']], $rank);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user