Successful migration and seed
This commit is contained in:
@@ -2,22 +2,30 @@
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\User;
|
||||
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Seed the application's database.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
// User::factory(10)->create();
|
||||
|
||||
User::factory()->create([
|
||||
'name' => 'Test User',
|
||||
'email' => 'test@example.com',
|
||||
// Seed admin user
|
||||
User::create([
|
||||
'name' => 'Admin',
|
||||
'email' => 'admin@skunklounge.com',
|
||||
'password' => Hash::make('securepass123'),
|
||||
'role' => 'admin',
|
||||
'balance' => 1000.00,
|
||||
]);
|
||||
|
||||
// Other seeds (e.g., site settings, promos) as before
|
||||
\DB::table('site_settings')->insert([
|
||||
['key' => 'currency_symbol', 'value' => '$'],
|
||||
['key' => 'default_balance', 'value' => '0.00'],
|
||||
['key' => 'maintenance_mode', 'value' => 'false'],
|
||||
]);
|
||||
\DB::table('promo_codes')->insert(['code' => 'START100', 'value' => 100.00]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user