42 lines
1.1 KiB
PHP
42 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Database\Seeder;
|
|
use Illuminate\Support\Facades\Hash;
|
|
|
|
class DatabaseSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Seed the application's database.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
// Create initial admin user without using factory (production-safe)
|
|
User::firstOrCreate(
|
|
['email' => 'admin@example.com'],
|
|
[
|
|
'name' => 'Admin User',
|
|
'email' => 'admin@example.com',
|
|
'password' => Hash::make('password'),
|
|
'email_verified_at' => now(),
|
|
]
|
|
);
|
|
|
|
// Create test user
|
|
User::firstOrCreate(
|
|
['email' => 'test@example.com'],
|
|
[
|
|
'name' => 'Test User',
|
|
'email' => 'test@example.com',
|
|
'password' => Hash::make('password'),
|
|
'email_verified_at' => now(),
|
|
]
|
|
);
|
|
|
|
// Note: Company and Transaction data is now synced from the backend
|
|
// via TransformDataPoolToProduction job, not seeded manually
|
|
}
|
|
}
|