<?php
namespace Database\Seeders;
use App\Models\User;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*/
public function run(): void
{
// User::factory(10)->create();
if (User::count() == 0) {
User::factory()->create([
'name' => '名字 名前', //'First User',
'email' => 'miuramo@gmail.com',
'password' => Hash::make('change me!'),
'two_factor_secret' => null, // これがないとAuthentication Codeを要求される
// 'email_verified_at' => null,
// 'remember_token' => null,
// 'two_factor_recovery_codes' => null,
// 'two_factor_confirmed_at' => null,
]);
}
$this->call([
TodoSeeder::class,
]);
}
}