21 lines
529 B
PHP
21 lines
529 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace Database\Seeders;
|
||
|
|
|
||
|
|
use App\Models\World;
|
||
|
|
use Illuminate\Database\Seeder;
|
||
|
|
|
||
|
|
/** The default world and a fast dev world. Safe to run on every deploy. */
|
||
|
|
class WorldSeeder extends Seeder
|
||
|
|
{
|
||
|
|
public function run(): void
|
||
|
|
{
|
||
|
|
World::firstOrCreate(['slug' => 'w1'], ['name' => 'World 1', 'started_at' => now()]);
|
||
|
|
World::firstOrCreate(['slug' => 'dev'], [
|
||
|
|
'name' => 'Dev world',
|
||
|
|
'config' => ['world' => ['speed' => 100]],
|
||
|
|
'started_at' => now(),
|
||
|
|
]);
|
||
|
|
}
|
||
|
|
}
|