{"id":1361,"date":"2023-02-15T20:39:19","date_gmt":"2023-02-15T11:39:19","guid":{"rendered":"https:\/\/trend-appsweb.com\/myportfolio\/?p=1361"},"modified":"2024-07-24T17:04:18","modified_gmt":"2024-07-24T08:04:18","slug":"%e6%97%a5%e6%9c%ac%e8%aa%9e%e3%81%ae%e3%83%80%e3%83%9f%e3%83%bc%e3%83%87%e3%83%bc%e3%82%bf%e3%82%92%e4%bd%9c%e6%88%90%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/trend-appsweb.com\/myportfolio\/?p=1361","title":{"rendered":"Seeder\u3067\u65e5\u672c\u8a9e\u306e\u30c0\u30df\u30fc\u30e6\u30fc\u30b6\u30fc\u3092\u4f5c\u6210\u3059\u308b"},"content":{"rendered":"<h3 class=\"midashi\">\u30c6\u30fc\u30de<\/h3>\n<p>\u3069\u3046\u3082\uff01\uff01naoto555\u3067\u3059\u3002<br \/>\n\u4eca\u56de\u306f\u3001\u65e5\u672c\u8a9e\u306e\u30c0\u30df\u30fc\u30e6\u30fc\u30b6\u30fc\u3092Seeder,ModelFactory,Faker\u6a5f\u80fd\u3092\u5229\u7528\u3057\u3066\u4f5c\u6210\u3057\u3066\u3044\u304f\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u3066\u3044\u3053\u3046\u3068\u601d\u3044\u307e\u3059\u3002Seeder\u3068\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u30c7\u30fc\u30bf\u3092\u4e00\u6589\u633f\u5165\u3059\u308b\u3088\u3046\u306a\u6a5f\u80fd\u306b\u306a\u308a\u307e\u3059\u3002\u4f7f\u7528\u3057\u3066\u3044\u308b\u958b\u767a\u74b0\u5883\u69cb\u7bc9\uff0cJetstream\u306e\u5c0e\u5165\u306b\u3064\u3044\u3066\u306e\u8a73\u7d30\u306b\u95a2\u3057\u3066\u306f\u904e\u53bb\u8a18\u4e8b\u3092\u3054\u53c2\u7167\u9802\u3051\u308b\u3068\u3046\u308c\u3057\u3044\u3067\u3059\u3002(<a class=\"row-title\" href=\"https:\/\/trend-appsweb.com\/myportfolio\/?p=721\" style=\"text-decoration: none;\">Laravel\u958b\u767a\u74b0\u5883\u69cb\u7bc9~\u30ed\u30b0\u30a4\u30f3\u6a5f\u80fd\u306e\u4f5c\u6210<\/a>)<\/span><br \/>\n<\/span><span style=\"color: #0000ff;\">(2024.2\u8a18\u8f09)<\/span><\/p>\n<h3 class=\"midashi\">\u958b\u767a\u74b0\u5883<\/h3>\n<div>\n<table style=\"border-collapse: collapse; width: 52.5389%;\">\n<tbody>\n<tr>\n<td style=\"width: 28.9191%;\">\u7d71\u5408\u958b\u767a\u74b0\u5883<\/td>\n<td style=\"width: 29.3499%;\">aws cloud9<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.9191%;\">PHP<\/td>\n<td style=\"width: 29.3499%;\">8.1.16<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.9191%;\">Laravel<\/td>\n<td style=\"width: 29.3499%;\">9.52<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.9191%;\">login\u6a5f\u80fd<\/td>\n<td style=\"width: 29.3499%;\">Laravel\/jetstream(livewire)<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.9191%;\">Database<\/td>\n<td style=\"width: 29.3499%;\">SQlite(version 3.7.17)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3 class=\"midashi\">\u89e3\u8aac<\/h3>\n<h4 class=\"tejun\">\u2460\u30e6\u30fc\u30b6\u30fc\u30c6\u30fc\u30d6\u30eb\u306e\u7de8\u96c6<\/h4>\n<p>Jetstream\u5c0e\u5165\u76f4\u5f8c\u306e\u30e6\u30fc\u30b6\u30fc\u30c6\u30fc\u30d6\u30eb\u306e\u30ab\u30e9\u30e0\u306f\u4ee5\u4e0b\u3067\u69cb\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\nid(ID)\u3001name(\u540d\u524d)\u3001email(\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9)\u3001email_verified_at(\u30e1\u30fc\u30eb\u8a8d\u8a3c)\u3001password(\u30ed\u30b0\u30a4\u30f3\u30d1\u30b9\u30ef\u30fc\u30c9)\u3001profile_photo(\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u753b\u50cf)\u3001timestamps(\u4f5c\u6210\u65e5\u6642\u3001\u7de8\u96c6\u65e5\u6642)<\/p>\n<p class=\"file_name\"><em>database\/migrations\/2014_10_12_000000_create_users_table.php\u3000(jetstream\u5c0e\u5165\u76f4\u5f8c)<br \/>\n<\/em><\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>public function up(): void\r\n{\r\n    Schema::create('users', function (Blueprint $table) {\r\n        $table-&gt;id();\r\n        $table-&gt;string('name');\r\n        $table-&gt;string('email')-&gt;unique();\r\n        $table-&gt;timestamp('email_verified_at')-&gt;nullable();\r\n        $table-&gt;string('password');\r\n        $table-&gt;rememberToken();\r\n        $table-&gt;foreignId('current_team_id')-&gt;nullable();\r\n        $table-&gt;string('profile_photo_path', 2048)-&gt;nullable();\r\n        $table-&gt;timestamps();\r\n    });\r\n}<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30ab\u30e9\u30e0\u4ee5\u5916\u306e\u30ab\u30e9\u30e0\u306b\u3082Seeder\u3067\u30c0\u30df\u30fc\u30c7\u30fc\u30bf\u3092\u5165\u308c\u3066\u307f\u305f\u3044\u306e\u3067\u3001handlename(\u30cf\u30f3\u30c9\u30eb\u30cd\u30fc\u30e0)\u3001profile(\u81ea\u5df1\u7d39\u4ecb)\u3068\u3044\u3046\u30ab\u30e9\u30e0\u3092\u8ffd\u52a0\u3057\u3066\u307f\u307e\u3059\u3002<br \/>\n\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u4ee5\u4e0b\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3061\u3001\u4f5c\u6210\u3055\u308c\u305f\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3057\u307e\u3059\u3002<\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>php artisan make:migration add_cloumns_to_users<\/code><\/pre>\n<\/div>\n<p><\/p>\n<p class=\"file_name\"><em>database\/migrations\/2023_XX_XX_XXXXXX_add_cloumns_to_users.php<\/em><\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>\/\/\u4e00\u90e8\u629c\u7c8b\r\npublic function up()\r\n{\r\n    Schema::table('users', function (Blueprint $table) {\r\n        $table-&gt;string('handlename')-&gt;nullable();   \/\/\u8ffd\u52a0\r\n        $table-&gt;text('profile')-&gt;nullable();        \/\/\u8ffd\u52a0\r\n    });\r\n}<\/code><\/pre>\n<\/div>\n<p>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3057\u3001\u8ffd\u52a0\u3057\u305f\u30ab\u30e9\u30e0\u3092\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u53cd\u6620\u3055\u305b\u307e\u3059\u3002<\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>php artisan migrate<\/code><\/pre>\n<\/div>\n<h4><\/h4>\n<h4 class=\"tejun\">\u2461Factory\u30d5\u30a1\u30a4\u30eb\u306e\u7de8\u96c6<\/h4>\n<p>Users\u30c6\u30fc\u30d6\u30eb\u306eFactory\u30d5\u30a1\u30a4\u30eb\u306f\u3001&#8221;\/app\/database\/facrories\/UserFactory.php&#8221;\u306b\u521d\u56de\u304b\u3089\u5165\u3063\u3066\u3044\u307e\u3059\u3002\u3067\u3059\u306e\u3067\u3001\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br \/>\n\u4f8b\u3048\u3070\u3001Procut\u30e2\u30c7\u30eb\u306eProducts\u30c6\u30fc\u30d6\u30eb\u7528\u306eFactory\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u4e0a\u3067\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3066\u3070\u30d5\u30a1\u30af\u30c8\u30ea\u30fc\u30d5\u30a1\u30a4\u30eb\u306e\u751f\u6210\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>php artisan make:factory ProductFactory\r\n<\/code><\/pre>\n<\/div>\n<p class=\"file_name\"><em>database\/factories\/UserFactory.php<\/em><\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>\/\/\u4e00\u90e8\u629c\u7c8b\r\npublic function definition(): array\r\n{\r\n    return [\r\n        'name' =&gt; $this-&gt;faker-&gt;name(),\r\n        'email' =&gt; $this-&gt;faker-&gt;unique()-&gt;safeEmail(),\r\n        'email_verified_at' =&gt; now(),\r\n        'password' =&gt; '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC\/.og\/at2.uheWG\/igi', \/\/ password\r\n        'two_factor_secret' =&gt; null,\r\n        \/\/'two_factor_recovery_codes' =&gt; null,        \/\/\u524a\u9664\r\n        'remember_token' =&gt; Str::random(10),\r\n        \/\/'profile_photo_path' =&gt; null,               \/\/\u524a\u9664\r\n        \/\/'current_team_id' =&gt; null,                  \/\/\u524a\u9664\r\n        'handlename' =&gt; $this-&gt;faker-&gt;userName(),     \/\/\u8ffd\u52a0\r\n        'profile' =&gt; $this-&gt;faker-&gt;realText(20),      \/\/\u8ffd\u52a0\r\n    ];\r\n}\r\n<\/code><\/pre>\n<\/div>\n<h4><\/h4>\n<h4 class=\"tejun\">\u2462Seeder\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u2461\u3067\u4f5c\u6210\u3057\u305fFactory\u30d5\u30a1\u30a4\u30eb\u3092\u767b\u9332\u3057\u3066\u3044\u304f<\/h4>\n<p>\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u4ee5\u4e0b\u306eLinux\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3061\u3001Seeder\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code><span style=\"color: #008000;\"><span style=\"color: #ffffff;\"><span class=\"hljs-attribute\">php<\/span><span> artisan make:seeder UserSeeder<\/span>\r\n<\/span><\/span><\/code><\/pre>\n<\/div>\n<p>\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3064\u3068\u3001\u201ddatabase\/seeders\/\u201d\u306e\u914d\u4e0b\u306b&#8221;UserSeeder.php&#8221;\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3057\u3066\u3044\u304f\u3002count(10)\u306e\u90e8\u5206\u304c\u4f55\u500b\u30c0\u30df\u30fc\u30c7\u30fc\u30bf\u3092\u4f5c\u308b\u304b\u3092\u8868\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u300110\u4ef6\u306e\u30c0\u30df\u30fc\u30c7\u30fc\u30bf\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p class=\"file_name\"><em>database\/seeders\/UserSeeder.php<\/em><\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>use App\\Models\\User;    \/\/\u8ffd\u52a0\r\n\r\n\/\/---------------\u4e2d\u7565---------------\r\npublic function run()\r\n{\r\n    User::factory()-&gt;count(10)-&gt;create();   \/\/\u8ffd\u52a0\r\n}<\/code><\/pre>\n<\/div>\n<h3><\/h3>\n<h4 class=\"tejun\">\u2463config\u30d5\u30a1\u30a4\u30eb\u3092\u66f8\u304d\u63db\u3048\u3001\u751f\u6210\u3055\u308c\u308bfaker\u30c7\u30fc\u30bf\u3092\u65e5\u672c\u8a9e\u5316\u3059\u308b<\/h4>\n<p>\u201dconfig\/app.php\u201d\u3092\u7de8\u96c6\u3057\u3066\u3001\u751f\u6210\u3055\u308c\u308bfaker\u30c7\u30fc\u30bf(\u30c0\u30df\u30fc\u30c7\u30fc\u30bf)\u3092\u65e5\u672c\u8a9e\u5316\u3057\u307e\u3059\u3002<\/p>\n<p class=\"file_name\"><em>config\/app.php<\/em><\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>\/*\r\n|--------------------------------------------------------------------------\r\n| Faker Locale\r\n|--------------------------------------------------------------------------\r\n|\r\n| This locale will be used by the Faker PHP library when generating fake\r\n| data for your database seeds. For example, this will be used to get\r\n| localized telephone numbers, street address information and more.\r\n|\r\n*\/\r\n\r\n\/\/'faker_locale' =&gt; 'en_US',   \/\/\u524a\u9664\r\n'faker_locale' =&gt; 'ja_JP',     \/\/\u8ffd\u52a0<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<h4 class=\"tejun\">\u2464Seeder\u306e\u5b9f\u884c<\/h4>\n<p>\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u4ee5\u4e0b\u306eLinux\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3061\u3001\u4f5c\u6210\u3057\u305fSeeder\u3092\u5b9f\u884c<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>php artisan db:seed --class=UserSeeder<\/code><\/pre>\n<\/div>\n<h3 class=\"midashi\">\u5b8c\u6210\u56f3<\/h3>\n<p>\u4e0a\u8a18\u624b\u9806\u306b\u3066\u3001\u4e0b\u56f3\u306e\u3088\u3046\u306b\u30c0\u30df\u30fc\u306e\u30c7\u30fc\u30bf\u304c\u4f5c\u6210\u3055\u308c\u307e\u3057\u305f\u3002<br \/>\n\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u306f\u3001\u5c11\u3057\u304a\u304b\u3057\u306a\u6587\u7ae0\u3067\u3059\u304c<span style=\"color: #0000ff;\"><span style=\"color: #000000;\">Seeder,ModelFactory,Faker\u6a5f\u80fd\u3092\u5229\u7528\u3059\u308b\u3068\u3053\u3093\u306a\u98a8\u306b\u81ea\u52d5\u3067\u30c0\u30df\u30fc\u306e\u30e6\u30fc\u30b6\u30fc\u30c7\u30fc\u30bf\u3092\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n<\/span><\/span><a href=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/dummydata-1.png\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/dummydata-1-1024x572.png\" alt=\"\" width=\"1099\" height=\"614\" class=\"alignnone wp-image-1415\" srcset=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/dummydata-1-1024x572.png 1024w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/dummydata-1-300x167.png 300w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/dummydata-1-768x429.png 768w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2023\/02\/dummydata-1.png 1304w\" sizes=\"(max-width: 1099px) 100vw, 1099px\" \/><\/a><\/p>\n<p><strong>\u3061\u306a\u307f\u306b\u4e0a\u306e\u8868\u306f\u3001User\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3068\u30d3\u30e5\u30fc\u3092\u4f5c\u6210\u3057\u2193\u306e\u624b\u9806\u3067\u30d3\u30e5\u30fc\u306b\u8868\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/strong><\/p>\n<p>\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u4ee5\u4e0b\u306eLinux\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3061\u3001\u4f5c\u6210\u3057\u305fSeeder\u3092\u5b9f\u884c<br \/>\n\u4f5c\u6210\u3055\u308c\u305f\u30c7\u30fc\u30bf\u4e00\u89a7\u3092\u30d3\u30e5\u30fc\u8868\u793a\u3057\u3066\u307f\u307e\u3059\u3002\u307e\u305a\u306f\u3001&#8221;Route\/web.php&#8221;\u306b\u4ee5\u4e0b\u306e1\u6587\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p class=\"file_name\"><em>routes\/web.php<\/em><\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>use App\\Http\\Controllers\\UserController;  \/\/\u8ffd\u52a0\r\n\r\n\/\/----------------------\u4e2d\u7565----------------------\r\n\r\nRoute::get('\/users\/index',[UserController::class,'index'])-&gt;name('users.index');<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>\u6b21\u306b\u30bf\u30fc\u30df\u30ca\u30eb\u306b\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3061\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3092\u4f5c\u6210\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>php artisan make:controller UserController --model=User<\/code><\/pre>\n<\/div>\n<p>\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3064\u3068\u3001&#8221;UserController.php&#8221;\u304c&#8221;app\/Http\/Controllers&#8221;\u306e\u914d\u4e0b\u306b\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u3053\u308c\u3092\u7de8\u96c6\u3002<\/p>\n<p class=\"file_name\"><em>app\/Http\/Controllers\/UserController.php<\/em><\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>\/\/index()\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u7de8\u96c6\r\npublic function index()\r\n{\r\n    $users = User::all(); \/\/\u8ffd\u52a0\r\n    return view('users.index', compact('users')); \/\/\u8ffd\u52a0\r\n}<\/code><\/pre>\n<\/div>\n<p class=\"file_name\">\u6b21\u306b\u30bf\u30fc\u30df\u30ca\u30eb\u306b\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3061\u3001\u30d3\u30e5\u30fc\u3092\u4f5c\u6210\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code># users\u30d5\u30a9\u30eb\u30c0\u306e\u4f5c\u6210\r\nmkdir resources\/views\/users\r\n\r\n# index\u30d3\u30e5\u30fc\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\r\ntouch resources\/views\/users\/index.blade.php<\/code><\/pre>\n<\/div>\n<p>\u4f5c\u6210\u3057\u305fIndex\u30d3\u30e5\u30fc\u3092\u7de8\u96c6<\/p>\n<p class=\"file_name\"><em>resources\/views\/users\/index.blade.php<\/em><\/p>\n<div class=\"hcb_wrap\" style=\"margin: 0;\">\n<pre class=\"prism line-numbers lang-html\" data-lang=\"HTML\"><code>&lt;div style=\"margin:30px\"&gt;\r\n    &lt;table border=\"1\"&gt;\r\n        &lt;tr&gt;\r\n            &lt;th style=\"padding:10px;\"&gt;\u540d\u524d(name)&lt;\/th&gt;\r\n            &lt;th style=\"padding:10px;\"&gt;\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9(email)&lt;\/th&gt;\r\n            &lt;th style=\"padding:10px;\"&gt;\u30cf\u30f3\u30c9\u30eb\u30cd\u30fc\u30e0(handlename)&lt;\/th&gt;\r\n            &lt;th style=\"padding:10px;\"&gt;\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb(profile)&lt;\/th&gt;\r\n        &lt;\/tr&gt;\r\n        \r\n        @foreach($users as $user)\r\n        &lt;tr style=\"padding:10px;\"&gt;\r\n            &lt;td style=\"padding:10px;\"&gt;{{ $user-&gt;name }}&lt;\/td&gt;\r\n            &lt;td style=\"padding:10px;\"&gt;{{ $user-&gt;email }}&lt;\/td&gt;\r\n            &lt;td style=\"padding:10px;\"&gt;{{ $user-&gt;handlename }}&lt;\/td&gt;\r\n            &lt;td style=\"padding:10px;\"&gt;{{ $user-&gt;profile }}&lt;\/td&gt;\r\n        &lt;\/tr&gt;\r\n        @endforeach\r\n    &lt;\/table&gt;\r\n&lt;\/div&gt;<\/code><\/pre>\n<\/div>\n<h3><\/h3>\n<p>\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u6253\u3061\u3001Prevew\u2192Preview Running Application\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001\u8868\u793a\u3055\u308c\u305fURL\u306e\u672b\u5c3e\u306b&#8221;\/users\/index&#8221;\u3068\u6253\u3066\u3070index\u30d3\u30e5\u30fc\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>php artisan serve --port=8080<\/code><\/pre>\n<\/div>\n<h3 class=\"midashi\">\u307e\u3068\u3081&amp;\u88dc\u8db3<\/h3>\n<p>\u4eca\u56de\u306f\u3001Faker\u3092\u4f7f\u3063\u3066\u30c0\u65e5\u672c\u8a9e\u306e\u30df\u30fc\u30c7\u30fc\u30bf\u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3057\u305f\u3002<br \/>\nLaravel\u306b\u306f\u6700\u521d\u304b\u3089\u3053\u306e\u30c0\u30df\u30fc\u306e\u30c7\u30fc\u30bf\u3092\u4f5c\u308bFaker\u304c\u642d\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u306a\u306e\u3067\u3001\u30e9\u30a4\u30d6\u30e9\u30ea\u7b49\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u306a\u304f\u3066\u3082\u305d\u306e\u307e\u307e\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3088\u304f\u4f7f\u308f\u308c\u308b\u30b3\u30de\u30f3\u30c9\u3068\u89e3\u8aac\u306e\u2461\u306b\u4ee5\u4e0b\u306e\u8a18\u8ff0\u3092\u66f8\u3044\u305f\u3068\u304d\u306e\u51fa\u529b\u7d50\u679c\u3092\u4ee5\u4e0b\u306e\u8868\u306b\u307e\u3068\u3081\u307e\u3057\u305f\u3002<\/p>\n<table width=\"1355\" style=\"width: 98.602%;\">\n<tbody>\n<tr>\n<td width=\"254\" style=\"width: 17.2686%; background-color: #eddddd;\">\u9805\u76ee<\/td>\n<td width=\"487\" style=\"width: 26.7504%; background-color: #eddddd;\">\u8a18\u8ff0<\/td>\n<td width=\"233\" style=\"width: 30.0169%; background-color: #eddddd;\">\u51fa\u529b\u7d50\u679c\u306e\u4f8b<\/td>\n<td width=\"381\" style=\"width: 25.4149%; background-color: #eddddd;\">\u5099\u8003<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 17.2686%;\">\u540d\u524d<\/td>\n<td style=\"width: 26.7504%;\">$this-&gt;faker-&gt;name()<\/td>\n<td style=\"width: 30.0169%;\">\u9234\u6728 \u5e79<\/td>\n<td style=\"width: 25.4149%;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 17.2686%;\">\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9<br \/>\n(\u5b9f\u5728\u3057\u306a\u3044)<\/td>\n<td style=\"width: 26.7504%;\">$this-&gt;faker-&gt;safeEmail()<\/td>\n<td style=\"width: 30.0169%;\"><span>cyoshida@example.com<\/span><\/td>\n<td style=\"width: 25.4149%;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 17.2686%;\">\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9<br \/>\n(\u30d5\u30ea\u30fc\u30e1\u30fc\u30eb)<\/td>\n<td style=\"width: 26.7504%;\">$this-&gt;faker-&gt;freeEmail()<\/td>\n<td style=\"width: 30.0169%;\">jun53@mail.goo.ne.jp<\/td>\n<td style=\"width: 25.4149%;\">\u5b9f\u5728\u3059\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u30a2\u30c9\u30ec\u30b9\u304c\u751f\u6210\u3055\u308c\u308b\u306e\u3067\u6ce8\u610f<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 17.2686%;\">\u30d5\u30a1\u30fc\u30b9\u30c8\u30cd\u30fc\u30e0<\/td>\n<td style=\"width: 26.7504%;\">$this-&gt;faker-&gt;firstName()<\/td>\n<td style=\"width: 30.0169%;\">\u5343\u4ee3<\/td>\n<td style=\"width: 25.4149%;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 17.2686%;\">\u82d7\u5b57<\/td>\n<td style=\"width: 26.7504%;\">$this-&gt;faker-&gt;lastName()<\/td>\n<td style=\"width: 30.0169%;\">\u6589\u85e4<\/td>\n<td style=\"width: 25.4149%;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 17.2686%;\">\u30e6\u30fc\u30b6\u30fc\u540d<\/td>\n<td style=\"width: 26.7504%;\">$this-&gt;faker-&gt;userName()<\/td>\n<td style=\"width: 30.0169%;\">fkanou<\/td>\n<td style=\"width: 25.4149%;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 17.2686%;\">\u96fb\u8a71\u756a\u53f7<\/td>\n<td style=\"width: 26.7504%;\">$this-&gt;faker-&gt;phoneNumber()<\/td>\n<td style=\"width: 30.0169%;\">08459-1-0068<\/td>\n<td style=\"width: 25.4149%;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 17.2686%;\">\u4f4f\u6240<\/td>\n<td style=\"width: 26.7504%;\">$this-&gt;faker-&gt;address()<\/td>\n<td style=\"width: 30.0169%;\">5851602 \u6803\u6728\u770c\u5409\u7530\u5e02\u6771\u533a\u4f50\u3005\u6728\u753a\u5c71\u5cb81-4-9<\/td>\n<td style=\"width: 25.4149%;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 17.2686%;\">\u56fd<\/td>\n<td style=\"width: 26.7504%;\">$this-&gt;faker-&gt;country()<\/td>\n<td style=\"width: 30.0169%;\">\u30d5\u30a3\u30b8\u30fc\u5171\u548c\u56fd<\/td>\n<td style=\"width: 25.4149%;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 17.2686%;\">\u770c\u540d<\/td>\n<td style=\"width: 26.7504%;\">$this-&gt;faker-&gt;prefecture()<\/td>\n<td style=\"width: 30.0169%;\">\u79cb\u7530\u770c<\/td>\n<td style=\"width: 25.4149%;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 17.2686%;\">\u4f1a\u793e\u540d<\/td>\n<td style=\"width: 26.7504%;\">$this-&gt;faker-&gt;company()<\/td>\n<td style=\"width: 30.0169%;\">\u6709\u9650\u4f1a\u793e \u4e2d\u6751<\/td>\n<td style=\"width: 25.4149%;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 17.2686%;\">\u30d1\u30b9\u30ef\u30fc\u30c9<\/td>\n<td style=\"width: 26.7504%;\">$this-&gt;faker-&gt;password()<\/td>\n<td style=\"width: 30.0169%;\">H\\kJw.e}Io<\/td>\n<td style=\"width: 25.4149%;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 17.2686%;\">\u65e5\u4ed8<\/td>\n<td style=\"width: 26.7504%;\">$this-&gt;faker-&gt;dateTime()-&gt;format(&#8216;Y-m-d&#8217;)<\/td>\n<td style=\"width: 30.0169%;\">1977-05-11<\/td>\n<td style=\"width: 25.4149%;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 17.2686%;\">\u30af\u30ec\u30ab\u306e\u756a\u53f7<\/td>\n<td style=\"width: 26.7504%;\">$this-&gt;faker-&gt;creditCardNumber()<\/td>\n<td style=\"width: 30.0169%;\">4532032521905382<\/td>\n<td style=\"width: 25.4149%;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 17.2686%;\">\u6027\u5225<\/td>\n<td style=\"width: 26.7504%;\">$this-&gt;faker-&gt;randomElement($array=[&#8216;\u7537\u6027&#8217;,&#8217;\u5973\u6027&#8217;])<\/td>\n<td style=\"width: 30.0169%;\">\u7537\u6027<\/td>\n<td style=\"width: 25.4149%;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 17.2686%;\">\u8a95\u751f\u65e5<\/td>\n<td style=\"width: 26.7504%;\">$this-&gt;faker-&gt;dateTimeBetween(&#8216;-70 years&#8217;, &#8216;-15years&#8217;)-&gt;format(&#8216;Y-m-d&#8217;)<\/td>\n<td style=\"width: 30.0169%;\">1999-08-28<\/td>\n<td style=\"width: 25.4149%;\">15\u6b73\u304b\u308970\u6b73<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 17.2686%;\">\u6587\u7ae0<\/td>\n<td style=\"width: 26.7504%;\">$this-&gt;faker-&gt;realText(20)<\/td>\n<td style=\"width: 30.0169%;\">\u307f\u3088\u3046\u306b\u9732\u3064\u3086\u304c\u592a\u967d\u305f\u3044\u3069\u3053\u307e\u3067\u3082\u7740\u3064\u3002<\/td>\n<td style=\"width: 25.4149%;\">200\u6587\u5b57\u4ee5\u4e0b\u307e\u3067\u751f\u6210\u53ef\u80fd<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color: #0000ff;\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30c6\u30fc\u30de \u3069\u3046\u3082\uff01\uff01naoto555\u3067\u3059\u3002 \u4eca\u56de\u306f\u3001\u65e5\u672c\u8a9e\u306e\u30c0\u30df\u30fc\u30e6\u30fc\u30b6\u30fc\u3092Seeder,ModelFactory,Faker\u6a5f\u80fd\u3092\u5229\u7528\u3057\u3066\u4f5c\u6210\u3057\u3066\u3044\u304f\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u3066\u3044\u3053\u3046\u3068\u601d\u3044\u307e\u3059\u3002Seeder\u3068\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u30c7\u30fc\u30bf [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[13],"tags":[],"class_list":["post-1361","post","type-post","status-publish","format-standard","hentry","category-laravelphp"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=\/wp\/v2\/posts\/1361","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1361"}],"version-history":[{"count":51,"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=\/wp\/v2\/posts\/1361\/revisions"}],"predecessor-version":[{"id":2520,"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=\/wp\/v2\/posts\/1361\/revisions\/2520"}],"wp:attachment":[{"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}