{"id":3730,"date":"2026-11-03T09:17:53","date_gmt":"2026-11-03T00:17:53","guid":{"rendered":"https:\/\/qol-kk.com\/wp2\/?p=3730"},"modified":"2026-11-03T09:17:53","modified_gmt":"2026-11-03T00:17:53","slug":"20261024-00mvllxn","status":"publish","type":"post","link":"https:\/\/qol-kk.com\/wp2\/blog\/2026\/11\/03\/20261024-00mvllxn\/","title":{"rendered":"Faker\u3067\u4f5c\u308b\u73fe\u5b9f\u7684\u306a\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u3068Seeder\u6d3b\u7528\u8853"},"content":{"rendered":"<h2>\u6982\u8981<\/h2>\n<p>\u958b\u767a\u3084\u30c6\u30b9\u30c8\u306b\u304a\u3044\u3066\u3001\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u306e\u8cea\u306f\u4f5c\u696d\u52b9\u7387\u306b\u76f4\u7d50\u3057\u307e\u3059\u3002<code>id<\/code> \u304c\u9023\u756a\u3067 <code>name<\/code> \u304c <code>test1<\/code>\u3001<code>test2<\/code>... \u306e\u3088\u3046\u306a\u30c7\u30fc\u30bf\u3067\u306f\u3001\u753b\u9762\u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u5d29\u308c\u306b\u3082\u6c17\u3065\u3051\u305a\u3001\u691c\u7d22\u3084\u30bd\u30fc\u30c8\u306e\u6319\u52d5\u78ba\u8a8d\u3082\u307e\u307e\u306a\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001PHP \u306e Faker\uff08<code>fakerphp\/faker<\/code>\uff09\u3092\u4f7f\u3063\u3066\u73fe\u5b9f\u7684\u306a\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u3092\u751f\u6210\u3057\u3001Laravel \u306e Factory \/ Seeder \u306b\u7d44\u307f\u8fbc\u3093\u3067\u518d\u73fe\u6027\u306e\u3042\u308b\u30c7\u30fc\u30bf\u6295\u5165\u3092\u884c\u3046\u624b\u9806\u3092\u3001\u30cf\u30f3\u30ba\u30aa\u30f3\u5f62\u5f0f\u3067\u307e\u3068\u3081\u307e\u3059\u3002Laravel \u3092\u984c\u6750\u306b\u3057\u307e\u3059\u304c\u3001Faker \u5358\u4f53\u306e\u8003\u3048\u65b9\u306f\u4ed6\u74b0\u5883\u3067\u3082\u901a\u7528\u3057\u307e\u3059\u3002<\/p>\n<h2>\u74b0\u5883<\/h2>\n<ul>\n<li>PHP 8.3+\uff08\u63a8\u5968 8.4\uff09<\/li>\n<li>Laravel 13.x<\/li>\n<li>fakerphp\/faker\uff08Laravel \u306b\u306f\u958b\u767a\u4f9d\u5b58\u3068\u3057\u3066\u6a19\u6e96\u540c\u68b1\uff09<\/li>\n<\/ul>\n<p>Laravel 13 \u306f\u6700\u4f4e\u8981\u4ef6\u304c PHP 8.3 \u4ee5\u4e0a\u3067\u3059\u3002\u53e4\u3044 PHP 8.2 \u306e\u307e\u307e\u3067\u306f\u52d5\u304b\u306a\u3044\u305f\u3081\u3001\u74b0\u5883\u3092\u5408\u308f\u305b\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>Laravel \u3092\u4f7f\u3063\u3066\u3044\u308c\u3070 Faker \u306f\u6700\u521d\u304b\u3089\u5165\u3063\u3066\u3044\u308b\u305f\u3081\u3001\u8ffd\u52a0\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u4e0d\u8981\u3067\u3059\u3002\u5358\u4f53\u3067\u4f7f\u3046\u5834\u5408\u306e\u307f\u4ee5\u4e0b\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">composer require --dev fakerphp\/faker<\/pre>\n<h2>\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u3067\u3042\u308a\u304c\u3061\u306a3\u3064\u306e\u554f\u984c<\/h2>\n<ol>\n<li><strong>\u975e\u73fe\u5b9f\u7684\u3059\u304e\u308b<\/strong> \u2014 \u540d\u524d\u304c <code>aaa<\/code>\u3001\u30e1\u30fc\u30eb\u304c <code>a@a.com<\/code>\u3001\u4f4f\u6240\u304c\u7a7a\u3002UI\u5d29\u308c\u3084\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u6f0f\u308c\u306b\u6c17\u3065\u3051\u306a\u3044\u3002<\/li>\n<li><strong>\u518d\u73fe\u3067\u304d\u306a\u3044<\/strong> \u2014 \u7279\u5b9a\u74b0\u5883\u3067\u3060\u3051\u518d\u73fe\u3059\u308b\u30d0\u30b0\u3002\u30e9\u30f3\u30c0\u30e0\u3059\u304e\u3066\u8ffd\u3048\u306a\u3044\u3002<\/li>\n<li><strong>\u6295\u5165\u304c\u624b\u4f5c\u696d<\/strong> \u2014 \u74b0\u5883\u3092\u4f5c\u308a\u76f4\u3059\u305f\u3073\u306b\u6d88\u3048\u308b\u3002<\/li>\n<\/ol>\n<p>Faker \u306f 1 \u3092\u3001<code>seed()<\/code> \u306b\u3088\u308b\u4e71\u6570\u56fa\u5b9a\u306f 2 \u3092\u3001Seeder \u306f 3 \u3092\u89e3\u6c7a\u3057\u307e\u3059\u3002<\/p>\n<h2>Faker \u306e\u57fa\u672c<\/h2>\n<p><code>Faker\\Factory::create()<\/code> \u3067\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\u3092\u4f5c\u308a\u3001\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u3088\u3046\u306b\u547c\u3073\u51fa\u3057\u307e\u3059\u3002\u30ed\u30b1\u30fc\u30eb\u306b <code>ja_JP<\/code> \u3092\u6e21\u3059\u3068\u3001\u540d\u524d\u30fb\u4f4f\u6240\u30fb\u4f1a\u793e\u540d\u306a\u3069\u304c\u65e5\u672c\u8a9e\u306b\u306a\u308a\u3001\u5b9f\u30c7\u30fc\u30bf\u306b\u8fd1\u3044\u898b\u305f\u76ee\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">&lt;?php\n\nuse Faker\\Factory;\n\n$faker = Factory::create('ja_JP');\n\necho $faker-&gt;name;          \/\/ \u5c71\u7530 \u592a\u90ce\necho $faker-&gt;safeEmail;     \/\/ example@example.org\uff08\u5b9f\u5728\u3057\u306a\u3044\u5b89\u5168\u306a\u30c9\u30e1\u30a4\u30f3\uff09\necho $faker-&gt;phoneNumber;   \/\/ 090-1234-5678\necho $faker-&gt;company;       \/\/ \u682a\u5f0f\u4f1a\u793e\u25cb\u25cb\necho $faker-&gt;realText(100); \/\/ \u305d\u308c\u3063\u307d\u3044\u65e5\u672c\u8a9e\u306e\u6587\u7ae0<\/pre>\n<p>\u3088\u304f\u4f7f\u3046\u30e1\u30bd\u30c3\u30c9\u3092\u6574\u7406\u3057\u307e\u3059\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u7528\u9014<\/th>\n<th>\u30e1\u30bd\u30c3\u30c9<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u6c0f\u540d<\/td>\n<td><code>name<\/code> \/ <code>firstName<\/code> \/ <code>lastName<\/code><\/td>\n<\/tr>\n<tr>\n<td>\u30e1\u30fc\u30eb<\/td>\n<td><code>safeEmail<\/code> \/ <code>unique()-&gt;safeEmail<\/code><\/td>\n<\/tr>\n<tr>\n<td>\u65e5\u4ed8<\/td>\n<td><code>dateTimeBetween('-1 year', 'now')<\/code><\/td>\n<\/tr>\n<tr>\n<td>\u6570\u5024<\/td>\n<td><code>numberBetween(1, 100)<\/code><\/td>\n<\/tr>\n<tr>\n<td>\u9078\u629e\u80a2<\/td>\n<td><code>randomElement(['A', 'B', 'C'])<\/code><\/td>\n<\/tr>\n<tr>\n<td>\u771f\u507d<\/td>\n<td><code>boolean(70)<\/code>\uff0870%\u3067true\uff09<\/td>\n<\/tr>\n<tr>\n<td>\u4efb\u610fnull<\/td>\n<td><code>optional()-&gt;phoneNumber<\/code>\uff08\u305f\u307e\u306bnull\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u300c\u63fa\u3089\u304e\u300d\u3092\u73fe\u5b9f\u306b\u5bc4\u305b\u308b<\/h2>\n<p>\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u304c\u73fe\u5b9f\u7684\u304b\u3069\u3046\u304b\u306f\u300c\u63fa\u3089\u304e\u300d\u3067\u6c7a\u307e\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li><code>unique()-&gt;safeEmail<\/code> \u2014 \u30e6\u30cb\u30fc\u30af\u5236\u7d04\u306e\u3042\u308b\u30ab\u30e9\u30e0\u306f\u91cd\u8907\u3092\u907f\u3051\u308b<\/li>\n<li><code>optional(0.3)-&gt;phoneNumber<\/code> \u2014 30%\u306e\u78ba\u7387\u3067\u5024\u300170%\u3067null\u3002\u5fc5\u9808\u3067\u306a\u3044\u6b04\u306enull\u3092\u518d\u73fe\u3059\u308b<\/li>\n<\/ul>\n<p>null \u304c\u6df7\u3056\u308b\u3053\u3068\u3067\u3001\u8868\u793a\u5074\u306e\u300c\u672a\u5165\u529b\u6642\u306e\u5206\u5c90\u300d\u3092\u81ea\u7136\u306b\u30c6\u30b9\u30c8\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>Factory \u306b\u7d44\u307f\u8fbc\u3080<\/h2>\n<p><code>config\/app.php<\/code> \u3067\u30ed\u30b1\u30fc\u30eb\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u306a\u304a Laravel 11 \u4ee5\u964d\u306e\u30b9\u30ea\u30e0\u5316\u3055\u308c\u305f config \u3067\u306f <code>faker_locale<\/code> \u304c <code>config\/app.php<\/code> \u306b\u65e2\u5b9a\u3067\u542b\u307e\u308c\u307e\u305b\u3093\u3002\u30ad\u30fc\u304c\u7121\u3051\u308c\u3070\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u81ea\u5206\u3067\u8ffd\u8a18\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">\/\/ config\/app.php\n'faker_locale' =&gt; 'ja_JP',<\/pre>\n<p>Factory \u3067\u306f <code>$this-&gt;faker<\/code> \u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">\/\/ database\/factories\/UserFactory.php\n&lt;?php\n\nnamespace Database\\Factories;\n\nuse App\\Models\\User;\nuse Illuminate\\Database\\Eloquent\\Factories\\Factory;\nuse Illuminate\\Support\\Facades\\Hash;\n\nclass UserFactory extends Factory\n{\n    protected $model = User::class;\n\n    public function definition(): array\n    {\n        return [\n            'name'       =&gt; $this-&gt;faker-&gt;name(),\n            'email'      =&gt; $this-&gt;faker-&gt;unique()-&gt;safeEmail(),\n            'phone'      =&gt; $this-&gt;faker-&gt;optional(0.6)-&gt;phoneNumber(),\n            'password'   =&gt; Hash::make('password'),\n            'role'       =&gt; $this-&gt;faker-&gt;randomElement(['admin', 'staff', 'member']),\n            'created_at' =&gt; $this-&gt;faker-&gt;dateTimeBetween('-1 year', 'now'),\n        ];\n    }\n\n    public function admin(): static\n    {\n        return $this-&gt;state(fn (array $attributes) =&gt; ['role' =&gt; 'admin']);\n    }\n}<\/pre>\n<p><code>state<\/code>\uff08<code>admin()<\/code>\uff09\u3092\u5b9a\u7fa9\u3059\u308b\u3068\u3001\u547c\u3073\u51fa\u3057\u5074\u306e\u610f\u56f3\u304c\u8aad\u307f\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">User::factory()-&gt;count(10)-&gt;create();         \/\/ \u4e00\u822c10\u4ef6\nUser::factory()-&gt;count(3)-&gt;admin()-&gt;create(); \/\/ \u7ba1\u7406\u80053\u4ef6<\/pre>\n<h2>\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u3054\u3068\u751f\u6210\u3059\u308b<\/h2>\n<p>\u4e00\u89a7\u753b\u9762\u3084 N+1 \u306e\u78ba\u8a8d\u306b\u306f\u3001\u95a2\u9023\u30c7\u30fc\u30bf\u3054\u3068\u751f\u6210\u3067\u304d\u308b\u3068\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">use App\\Models\\User;\nuse App\\Models\\Post;\n\nUser::factory()\n    -&gt;count(5)\n    -&gt;has(Post::factory()-&gt;count(3)) \/\/ \u5404\u30e6\u30fc\u30b6\u30fc\u306b3\u4ef6\u306e\u6295\u7a3f\n    -&gt;create();\n\nPost::factory()\n    -&gt;count(10)\n    -&gt;for(User::factory()-&gt;admin()) \/\/ \u3059\u3079\u3066\u540c\u3058\u7ba1\u7406\u8005\u306b\u7d10\u3065\u304f\n    -&gt;create();<\/pre>\n<p><code>PostFactory<\/code> \u3067\u306f\u89aa\u30ad\u30fc\u3092 <code>User::factory()<\/code> \u306b\u3057\u3066\u304a\u3051\u3070\u3001\u5358\u72ec <code>create()<\/code> \u6642\u306b\u89aa\u3082\u81ea\u52d5\u751f\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<h2>Seeder \u3067\u30b7\u30ca\u30ea\u30aa\u3092\u7d44\u3080<\/h2>\n<p>Factory \u304c\u300c\u4f5c\u308a\u65b9\u300d\u3001Seeder \u304c\u300c\u3069\u308c\u3092\u3069\u308c\u3060\u3051\u5165\u308c\u308b\u304b\u300d\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">\/\/ database\/seeders\/DatabaseSeeder.php\npublic function run(): void\n{\n    User::factory()-&gt;admin()-&gt;create([\n        'name'  =&gt; '\u7ba1\u7406\u8005',\n        'email' =&gt; 'admin@example.com',\n    ]);\n\n    User::factory()-&gt;count(20)-&gt;has(Post::factory()-&gt;count(5))-&gt;create();\n}<\/pre>\n<pre class=\"lang:default decode:true\">php artisan db:seed                 # Seed\u3060\u3051\nphp artisan migrate:fresh --seed    # \u4f5c\u308a\u76f4\u3057\u3066Seed<\/pre>\n<p>\u7a2e\u5225\u3054\u3068\u306b Seeder \u3092\u5206\u3051\u3001<code>call()<\/code> \u3067\u307e\u3068\u3081\u308b\u3068\u898b\u901a\u3057\u304c\u3088\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">$this-&gt;call([UserSeeder::class, PostSeeder::class]);<\/pre>\n<h2>\u518d\u73fe\u6027: \u4e71\u6570\u3092\u56fa\u5b9a\u3059\u308b<\/h2>\n<p><code>seed()<\/code> \u3092\u547c\u3076\u3068\u751f\u6210\u304c\u6c7a\u5b9a\u7684\u306b\u306a\u308a\u3001\u300c\u30e9\u30f3\u30c0\u30e0\u3060\u3051\u3069\u6bce\u56de\u540c\u3058\u300d\u306b\u306a\u308a\u307e\u3059\u3002\u518d\u73fe\u30d0\u30b0\u3092\u30c1\u30fc\u30e0\u3067\u540c\u6761\u4ef6\u3067\u8ffd\u3048\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">$faker = Factory::create('ja_JP');\n$faker-&gt;seed(1234);<\/pre>\n<p>\u30c6\u30b9\u30c8\u3067\u306f <code>RefreshDatabase<\/code> \u3068\u4f75\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">use Illuminate\\Foundation\\Testing\\RefreshDatabase;\n\nclass PostTest extends TestCase\n{\n    use RefreshDatabase;\n\n    public function test_\u4e00\u89a7\u304c\u8868\u793a\u3055\u308c\u308b(): void\n    {\n        $this-&gt;faker-&gt;seed(42);\n        $posts = Post::factory()-&gt;count(10)-&gt;create();\n\n        $this-&gt;get('\/posts')\n            -&gt;assertOk()\n            -&gt;assertSeeText($posts-&gt;first()-&gt;title);\n    }\n}<\/pre>\n<h2>\u5927\u91cf\u30c7\u30fc\u30bf\u306f\u30c1\u30e3\u30f3\u30af INSERT<\/h2>\n<p>\u6570\u4e07\u4ef6\u3092 <code>create()<\/code> \u3067\u56de\u3059\u3068\u9045\u304f\u306a\u308a\u307e\u3059\u3002\u5c5e\u6027\u3060\u3051\u751f\u6210\u3057\u3066\u307e\u3068\u3081\u3066\u6295\u5165\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">use Illuminate\\Support\\Facades\\DB;\n\n$now = now();\n\ncollect(range(1, 50000))\n    -&gt;chunk(1000)\n    -&gt;each(function ($chunk) use ($now) {\n        $rows = $chunk-&gt;map(fn () =&gt; [\n            'name'       =&gt; fake()-&gt;name(),\n            'email'      =&gt; fake()-&gt;unique()-&gt;safeEmail(),\n            'created_at' =&gt; $now,\n            'updated_at' =&gt; $now,\n        ])-&gt;all();\n\n        DB::table('users')-&gt;insert($rows);\n    });<\/pre>\n<p><code>DB::table()-&gt;insert()<\/code> \u306f\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3092\u81ea\u52d5\u4ed8\u4e0e\u3057\u306a\u3044\u305f\u3081\u624b\u52d5\u3067\u57cb\u3081\u307e\u3059\u30021000\u4ef6\u7a0b\u5ea6\u306e\u30c1\u30e3\u30f3\u30af\u306b\u533a\u5207\u308a\u3001\u30e1\u30e2\u30ea\u3068 <code>unique()<\/code> \u5019\u88dc\u306e\u67af\u6e07\u3092\u907f\u3051\u307e\u3059\u3002<\/p>\n<h2>\u78ba\u8a8d\u65b9\u6cd5<\/h2>\n<pre class=\"lang:default decode:true\">\/\/ php artisan tinker\n&gt;&gt;&gt; User::count();\n=&gt; 21\n&gt;&gt;&gt; User::first()-&gt;name;\n=&gt; \"\u5c71\u7530 \u592a\u90ce\"\n&gt;&gt;&gt; User::pluck('email')-&gt;duplicates()-&gt;isEmpty();\n=&gt; true<\/pre>\n<h2>\u6ce8\u610f\u70b9<\/h2>\n<ul>\n<li><strong>\u672c\u756a\u74b0\u5883\u3067 Seeder \u3092\u6d41\u3055\u306a\u3044<\/strong>\u3002<code>app()-&gt;environment('production')<\/code> \u3067\u30ac\u30fc\u30c9\u3059\u308b\u3002<\/li>\n<li><strong><code>email<\/code> \u3067\u306a\u304f <code>safeEmail<\/code> \u3092\u4f7f\u3046<\/strong>\u3002\u524d\u8005\u306f\u5b9f\u5728\u30c9\u30e1\u30a4\u30f3\u3092\u751f\u6210\u3057\u3046\u308b\u305f\u3081\u3001\u8aa4\u9001\u4fe1\u9632\u6b62\u306b\u4e88\u7d04\u30c9\u30e1\u30a4\u30f3\u3092\u4f7f\u3046\u3002<\/li>\n<li><strong><code>unique()<\/code> \u306e\u67af\u6e07<\/strong>\u3002\u9078\u629e\u80a2\u306e\u5c11\u306a\u3044\u30e1\u30bd\u30c3\u30c9\u306b <code>unique()<\/code> \u3092\u4ed8\u3051\u3066\u5927\u91cf\u751f\u6210\u3059\u308b\u3068\u4f8b\u5916\u306b\u306a\u308b\u3002\u5019\u88dc\u306e\u5e83\u3044\u30e1\u30bd\u30c3\u30c9\u3068\u4f75\u7528\u3059\u308b\u3002<\/li>\n<li><strong>\u30ed\u30b1\u30fc\u30eb\u4f9d\u5b58\u306e\u6319\u52d5<\/strong>\u3002<code>phoneNumber<\/code> \u306e\u6841\u6570\u306a\u3069\u306f\u30ed\u30b1\u30fc\u30eb\u3067\u5909\u308f\u308b\u3002\u53b3\u5bc6\u306b\u30a2\u30b5\u30fc\u30c8\u3059\u308b\u306a\u3089\u56fa\u5b9a\u5024\u3082\u691c\u8a0e\u3059\u308b\u3002<\/li>\n<\/ul>\n<h2>\u307e\u3068\u3081<\/h2>\n<ul>\n<li>Faker + \u30ed\u30b1\u30fc\u30eb\u3067\u73fe\u5b9f\u7684\u306a\u898b\u305f\u76ee\u3092\u3001<code>unique()<\/code> \/ <code>optional()<\/code> \u3067\u63fa\u3089\u304e\u3092\u4f5c\u308b\u3002<\/li>\n<li>Factory \u306f\u300c\u4f5c\u308a\u65b9\u300d\u3001Seeder \u306f\u300c\u30b7\u30ca\u30ea\u30aa\u300d\u3002state \u3067\u7a2e\u5225\u3092\u5ba3\u8a00\u7684\u306b\u8868\u73fe\u3059\u308b\u3002<\/li>\n<li><code>has()<\/code> \/ <code>for()<\/code> \u3067\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u3054\u3068\u751f\u6210\u3067\u304d\u3001\u4e00\u89a7\u753b\u9762\u3084 N+1 \u306e\u78ba\u8a8d\u306b\u4f7f\u3048\u308b\u3002<\/li>\n<li><code>seed()<\/code> \u3067\u4e71\u6570\u3092\u56fa\u5b9a\u3059\u308c\u3070\u3001\u30e9\u30f3\u30c0\u30e0\u306a\u306e\u306b\u518d\u73fe\u53ef\u80fd\u306b\u306a\u308b\u3002<\/li>\n<li>\u5927\u91cf\u30c7\u30fc\u30bf\u306f <code>DB::table()-&gt;insert()<\/code> \u306e\u30c1\u30e3\u30f3\u30af\u6295\u5165\u3067\u9ad8\u901f\u5316\u3059\u308b\u3002<\/li>\n<li>\u672c\u756a\u3067\u306e Seed \u5b9f\u884c\u306f\u30ac\u30fc\u30c9\u3059\u308b\u3002<\/li>\n<\/ul>\n<p>\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u306e\u6574\u5099\u306f\u5730\u5473\u3067\u3059\u304c\u3001\u6700\u521d\u306b Factory \u3092\u6574\u3048\u3066\u304a\u304f\u3068\u3001\u4ee5\u964d\u306e\u958b\u767a\u901f\u5ea6\u3068\u30ec\u30d3\u30e5\u30fc\u306e\u8cea\u304c\u306f\u3063\u304d\u308a\u5909\u308f\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u958b\u767a\u3084\u30c6\u30b9\u30c8\u306b\u304a\u3044\u3066\u3001\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u306e\u8cea\u306f\u4f5c\u696d\u52b9\u7387\u306b\u76f4\u7d50\u3057\u307e\u3059\u3002id \u304c\u9023\u756a\u3067 name \u304c test1\u3001test2... \u306e\u3088\u3046\u306a\u30c7\u30fc\u30bf\u3067\u306f\u3001\u753b\u9762\u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u5d29\u308c\u306b\u3082\u6c17\u3065\u3051\u305a\u3001\u691c\u7d22\u3084\u30bd\u30fc\u30c8\u306e\u6319\u52d5\u78ba\u8a8d\u3082\u307e\u307e\u306a\u308a\u307e\u305b\u3093\u3002<\/p>\n","protected":false},"author":1,"featured_media":3729,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","_lightning_design_setting":[],"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[34],"tags":[153,98,296,1188,308],"class_list":["post-3730","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php-memorandum","tag-laravel","tag-php","tag-seeder","tag-1188","tag-308"],"veu_head_title_object":{"title":"","add_site_title":""},"jetpack_publicize_connections":[],"jetpack-related-posts":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/qol-kk.com\/wp2\/wp-content\/uploads\/2026\/11\/20261024-00mvllxn-thumbnail.jpg","_links":{"self":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts\/3730","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/comments?post=3730"}],"version-history":[{"count":1,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts\/3730\/revisions"}],"predecessor-version":[{"id":3731,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts\/3730\/revisions\/3731"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/media\/3729"}],"wp:attachment":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/media?parent=3730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/categories?post=3730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/tags?post=3730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}