File: /home/workzeni/agency-erp-05.workzenix.com/database/seeders/UserSeeder.php
<?php
namespace Database\Seeders;
use App\Models\CompanyInfo;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
use Carbon\Carbon;
class UserSeeder extends Seeder
{
public function run(): void
{
CompanyInfo::create([
'name' => 'Taiba Alliance',
'logo' => '/admin/assets/images/defult-img/logo.webp',
'address' => 'Not provided',
'email' => 'info@taibaalliance.com',
'phone' => 'Not provided',
'website' => 'https://taibaalliance.com/',
'bdt_acct' => 0.00,
'sar_acct' => 0.00,
'status' => 1,
]);
DB::table('users')->insert([
[
'company_id' => 1,
'name' => 'Super Admin',
'phone' => '01710000001',
'email' => 'admin@example.com',
'password' => Hash::make('12345678'),
'role' => 1,
'status' => 1,
'created_at' => Carbon::now(),
'updated_at' => Carbon::now(),
],
[
'company_id' => 1,
'name' => 'Super Admin',
'phone' => '01710034001',
'email' => 'admin@gmail.com',
'password' => Hash::make('password'),
'role' => 1,
'status' => 1,
'created_at' => Carbon::now(),
'updated_at' => Carbon::now(),
],
[
'company_id' => 1,
'name' => 'Manager User',
'phone' => '01710000002',
'email' => 'manager@example.com',
'password' => Hash::make('12345678'),
'role' => 2,
'status' => 1,
'created_at' => Carbon::now(),
'updated_at' => Carbon::now(),
],
[
'company_id' => 1,
'name' => 'Account User',
'phone' => '01710000003',
'email' => 'account@example.com',
'password' => Hash::make('12345678'),
'role' => 3,
'status' => 1,
'created_at' => Carbon::now(),
'updated_at' => Carbon::now(),
],
[
'company_id' => 2,
'name' => 'Normal User',
'phone' => '01710000004',
'email' => 'user@example.com',
'password' => Hash::make('12345678'),
'role' => 4,
'status' => 1,
'created_at' => Carbon::now(),
'updated_at' => Carbon::now(),
],
]);
}
}