From 01623de4241656941a9c218d0fbea83124bd89e5 Mon Sep 17 00:00:00 2001 From: HolgerHatGarKeineNode Date: Mon, 27 Feb 2023 18:42:28 +0100 Subject: [PATCH] course tags corrected --- app/Http/Livewire/School/Form/CourseForm.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Http/Livewire/School/Form/CourseForm.php b/app/Http/Livewire/School/Form/CourseForm.php index 84f2fbad..3bd8118b 100644 --- a/app/Http/Livewire/School/Form/CourseForm.php +++ b/app/Http/Livewire/School/Form/CourseForm.php @@ -55,6 +55,12 @@ class CourseForm extends Component ->can('update', $this->course) ) { abort(403); + } else { + $this->selectedTags = $this->course->tags() + ->where('type', 'course') + ->get() + ->map(fn($tag) => $tag->name) + ->toArray(); } if (!$this->fromUrl) { $this->fromUrl = url()->previous();