create(); $usr = User::factory()->create([ 'first_name' => 'PACS Sync', 'display_name' => 'PACS Sync Agent', 'username' => '$$_pacs_sync_$$', 'password' => bcrypt(fake()->password(20)), 'is_active' => false, ]); $usr->assignRole(Role::SystemAgent); $usr = User::factory()->create([ 'first_name' => 'Administrator', 'display_name' => 'Admin', 'username' => 'admin', 'email' => 'admin@example.com', 'email_verified_at' => now(), 'phone' => '+8801733938582', ]); $usr->assignRole(Role::Admin); $chevron = Institute::where('name', 'Chevron')->first(); $cmch = Institute::where('name', 'CMCH')->first(); User::factory(2)->create([ 'institute_id' => $chevron->id, ]) ->each(function ($u) { $u->assignRole(Role::Technician); }); User::factory(2)->create([ 'institute_id' => $cmch->id, ]) ->each(function ($u) { $u->assignRole(Role::Technician); }); User::factory(8)->create() ->each(function ($u) { $u->assignRole(Role::Radiologist); }); User::factory(3)->create() ->each(function ($u) { $u->assignRole(Role::Guest); }); } }