Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions database/seeders/DatabaseSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use App\Models\User;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;

class DatabaseSeeder extends Seeder
{
Expand All @@ -15,9 +16,13 @@ public function run(): void
{
// User::factory(10)->create();

User::factory()->create([
'name' => 'Test User',
'email' => '[email protected]',
]);
User::firstOrCreate(
['email' => '[email protected]'],
[
'name' => 'Test User',
'password' => Hash::make('password'),
'email_verified_at' => now(),
]
);
}
}