users seeder

This commit is contained in:
nurmuhammet committed 2025-10-27 17:06:13 +05:00
1 parent dcd80571bf
commit 73d12068d8
2 files changed
+6 -1

No files matched your search

+6
View File
@@ -4,6 +4,7 @@
use App\Models\User;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class UsersTableSeeder extends Seeder
{
@@ -31,6 +32,11 @@ public function run(): void
'must_fill_profile' => true,
]);
DB::statment("
SELECT setval('users_id_seq', (SELECT MAX(id) from users));
SELECT nextval('users_id_seq');
");
User::factory()->count(3)->create(['password' => bcrypt('payload10')]);
}
}