<?php
use Illuminate\Database\Seeder;
use App\Models\User;
class UserTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
factory(User::class, 5)->create();
User::create([
'id' => '100',
'name' => '田中太郎',
'name_kana' => 'タナカタロウ',
'email' => 'test@rikai.technology',
'tel' => '1234567890',
'password' => bcrypt('password'),
]);
}
}
database/seeds/UserTableSeeder.phpにこのような記述で、ダミーのデータを投入することができる。