diff --git a/app/Filament/Pages/Learning/StudyGroup/Index.php b/app/Filament/Pages/Learning/StudyGroup/Index.php index bffe4b6..f18185f 100644 --- a/app/Filament/Pages/Learning/StudyGroup/Index.php +++ b/app/Filament/Pages/Learning/StudyGroup/Index.php @@ -148,6 +148,7 @@ public function studyGroupFormSchema(): array ->multiple() ->searchable() ->required() + ->live() ->columnSpanFull(), TextInput::make('name') diff --git a/app/Models/StudyGroup.php b/app/Models/StudyGroup.php index 3d241ae..24944bf 100644 --- a/app/Models/StudyGroup.php +++ b/app/Models/StudyGroup.php @@ -65,6 +65,6 @@ function ($q) use ($courseIds, $excludeGroupId) { ->pluck('leader_id') ->toArray(); - return array_unique(array_merge($busyMemberIds, $busyLeaderIds)); + return array_unique(array_filter(array_merge($busyMemberIds, $busyLeaderIds))); } }