mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/tickme.git
synced 2026-08-19 12:33:57 +00:00
55 lines
1.9 KiB
PHP
55 lines
1.9 KiB
PHP
<?php
|
|
|
|
use App\Classes\ValueObjects\Constants\Roles;
|
|
use Illuminate\Database\Seeder;
|
|
use Illuminate\Support\Facades\DB;
|
|
use Illuminate\Support\Facades\Hash;
|
|
use Illuminate\Support\Str;
|
|
|
|
class UsersTableSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function run()
|
|
{
|
|
|
|
DB::table('users')->insert([
|
|
[
|
|
'name' => 'Omair Saleh',
|
|
'email' => 'omair@izyim.com',
|
|
'password' => Hash::make('123456abcabc'),
|
|
'email_verified_at' => \Carbon\Carbon::now(),
|
|
'created_at' => \Carbon\Carbon::now(),
|
|
'updated_at' => \Carbon\Carbon::now()
|
|
],
|
|
[
|
|
'name' => 'Development User',
|
|
'email' => env('EMAIL_DEVELOPMENT', 'dev@izyim.com'),
|
|
'password' => Hash::make('123456abcabc'),
|
|
'email_verified_at' => \Carbon\Carbon::now(),
|
|
'created_at' => \Carbon\Carbon::now(),
|
|
'updated_at' => \Carbon\Carbon::now()
|
|
]
|
|
]);
|
|
|
|
$employees = ['PY', 'IVY', 'TAN KING KIAT', 'VICKY NG', 'SHAFIQA', 'ZULAIKHA', 'HASAN', 'VENKA', 'AFRINA', 'YING ZHI', 'XI QING', 'LEONG', 'MARYAM', 'NAJWA', 'HARITH', 'LI HSIA', 'JY', 'HARRY', 'PM'];
|
|
foreach($employees as $employee){
|
|
DB::table('users')->insert([
|
|
[
|
|
'name' => Str::title($employee),
|
|
'email' => Str::snake(str::lower($employee)).'@cief-malaysia.com',
|
|
'password' => Hash::make('123456abcabc'),
|
|
'email_verified_at' => \Carbon\Carbon::now(),
|
|
'created_at' => \Carbon\Carbon::now(),
|
|
'updated_at' => \Carbon\Carbon::now()
|
|
]
|
|
]);
|
|
}
|
|
|
|
// factory(App\Models\User::class, 30)->create();
|
|
}
|
|
}
|