Files
thecrimesynticate/database/seeders/DatabaseSeeder.php
T
2026-06-27 14:38:18 +03:00

37 lines
863 B
PHP

<?php
namespace Database\Seeders;
use App\Models\User;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*/
public function run(): void
{
// Seed locations first (required by other seeders)
$this->call([
LocationSeeder::class,
]);
// Then seed items and crimes
$this->call([
ItemSeeder::class,
CrimeSeeder::class,
]);
// Create test user
$user = User::factory()->create([
'name' => 'Test User',
'email' => 'test@example.com',
'password' => bcrypt('password'),
]);
// Optionally create a test character for the user
// This can be done manually through the UI or via a separate seeder
}
}