todo/database/seeders/DatabaseSeeder.php

26 lines
543 B
PHP
Raw Normal View History

2024-04-27 14:17:16 +03:00
<?php
namespace Database\Seeders;
use App\Models\User;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
2024-05-02 16:54:51 +03:00
use Illuminate\Support\Facades\Hash;
2024-04-27 14:17:16 +03:00
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',
2024-05-02 16:54:51 +03:00
'password' => Hash::make('password'),
2024-04-27 14:17:16 +03:00
]);
}
}