Skip to content

Commit

Permalink
factoryでseederを追加するように調整
Browse files Browse the repository at this point in the history
  • Loading branch information
nagi125 committed Dec 21, 2020
1 parent 06231c0 commit 41c2207
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion database/seeders/DatabaseSeeder.php
Expand Up @@ -14,7 +14,6 @@ class DatabaseSeeder extends Seeder
*/
public function run()
{
// User::factory(10)->create();
$this->call(UsersTableSeeder::class);
}
}
3 changes: 3 additions & 0 deletions database/seeders/UsersTableSeeder.php
@@ -1,6 +1,7 @@
<?php
namespace Database\Seeders;

use App\Models\User;
use Illuminate\Database\Seeder;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
Expand All @@ -14,6 +15,8 @@ class UsersTableSeeder extends Seeder
*/
public function run()
{
User::factory(10)->create();

DB::table('users')->insert([
[
'name' => 'nagi125',
Expand Down

0 comments on commit 41c2207

Please sign in to comment.