75 lines
2.3 KiB
PHP
75 lines
2.3 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use Illuminate\Database\Seeder;
|
|
use Illuminate\Support\Facades\DB;
|
|
use Illuminate\Support\Facades\Hash;
|
|
|
|
class AdminSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
$users = [
|
|
[
|
|
'fullname' => 'Admin',
|
|
'username' => 'admin',
|
|
'email' => 'admin@tgs.com.vn',
|
|
'password' => '!admin@123!@#',
|
|
],
|
|
[
|
|
'fullname' => 'Nguyễn Cao Luyện',
|
|
'username' => 'nguyencaoluyen',
|
|
'email' => 'nguyencaoluyen@tgs.com.vn',
|
|
'password' => 'nguyencaoluyen@123(#*',
|
|
],
|
|
[
|
|
'fullname' => 'Trương Văn Phương',
|
|
'username' => 'truongvanphuong',
|
|
'email' => 'truongvanphuong@tgs.com.vn',
|
|
'password' => 'truongvanphuong@123(#*',
|
|
],
|
|
[
|
|
'fullname' => 'Nguyễn Thị Thêm',
|
|
'username' => 'nguyenthithem',
|
|
'email' => 'nguyenthithem@tgs.com.vn',
|
|
'password' => 'nguyenthithem@123(#*',
|
|
],
|
|
[
|
|
'fullname' => 'Đỗ Thị Vân Anh',
|
|
'username' => 'dothivanan',
|
|
'email' => 'dothivanan@tgs.com.vn',
|
|
'password' => 'dothivanan@123(#*',
|
|
],
|
|
[
|
|
'fullname' => 'Lê Huỳnh Ngọc Thảo',
|
|
'username' => 'lehuynhngocthao',
|
|
'email' => 'lehuynhngocthao@tgs.com.vn',
|
|
'password' => 'lehuynhngocthao@123(#*',
|
|
],
|
|
[
|
|
'fullname' => 'Đinh Thanh Tùng',
|
|
'username' => 'dinhthanhtung',
|
|
'email' => 'dinhthanhtung@tgs.com.vn',
|
|
'password' => 'dinhthanhtung@123(#*',
|
|
],
|
|
];
|
|
|
|
foreach ($users as $user) {
|
|
DB::table('user')->insert([
|
|
'fullname' => $user['fullname'],
|
|
'username' => $user['username'],
|
|
'email' => $user['email'],
|
|
'email_verified_at' => now(),
|
|
'password' => Hash::make($user['password']),
|
|
'status' => 1,
|
|
'created_at' => now(),
|
|
'updated_at' => now(),
|
|
]);
|
|
}
|
|
}
|
|
}
|