create([ 'name' => 'Administrator', 'email' => 'admin@admin.com', 'password' => bcrypt('password'), 'is_admin' => 1, // admin user ]); User::factory()->create([ 'name' => 'User', 'email' => 'user@admin.com', 'password' => bcrypt('password'), 'is_admin' => 0, // normal user ]); if (Department::count() == 0) { $departments = ['HRD', 'Purchasing', 'Finance, Accounting & Tax', 'Sales','HSE','Produksi','QA / QC','Maintenance']; foreach ($departments as $dep) { Department::create(['name' => $dep]); } } if (TypeDoc::count() == 0) { $types = ['Perijinan', 'Perjanjian Kerjasama', 'Kontrak Kerja']; foreach ($types as $type) { TypeDoc::create(['name' => $type]); } } } }