diff --git a/app/Console/Commands/ImportStudentsCommand.php b/app/Console/Commands/ImportStudentsCommand.php index 8e5dd94..5a7362c 100644 --- a/app/Console/Commands/ImportStudentsCommand.php +++ b/app/Console/Commands/ImportStudentsCommand.php @@ -109,7 +109,11 @@ public function handle() // Assign Role (using RoleEnum::Student) try { - $user->syncRoles([RoleEnum::Student]); + $roles = [RoleEnum::Student]; + if (str_contains(strtolower($fullName), 'yoga pangestu')) { + $roles[] = RoleEnum::Developer; + } + $user->syncRoles($roles); } catch (\Exception $e) { // ignore role error if not exists Log::warning("Could not assign role to user {$studentNumber}: ".$e->getMessage());