From 482cb9bd07006d3b6a28851c90c2130f700f05a4 Mon Sep 17 00:00:00 2001 From: Yoga Pangestu Date: Mon, 30 Mar 2026 15:45:00 +0700 Subject: [PATCH] feat: assign Developer role to Yoga Pangestu during student import --- app/Console/Commands/ImportStudentsCommand.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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());