]> git.localhorst.tv Git - alttp.git/commitdiff
touch episode on manage
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Thu, 10 Jul 2025 22:13:42 +0000 (00:13 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Thu, 10 Jul 2025 22:13:42 +0000 (00:13 +0200)
app/Http/Controllers/EpisodeController.php

index bfbb8a48f02dbf1549ad40ace4eba4e3106f2878..bb9052c6f2ef3710d33347cc5faa81efdab4cbf0 100644 (file)
@@ -36,6 +36,7 @@ class EpisodeController extends Controller
                ]);
 
                $episode->channels()->attach($channel, $validatedProps);
+               $episode->touch();
 
                return $episode->load('channels')->toJson();
        }
@@ -91,6 +92,8 @@ class EpisodeController extends Controller
                        $crew->save();
                }
 
+               $episode->touch();
+
                $user = $request->user();
                if ($user->isPrivileged()) {
                        return $episode->load(['crew', 'crew.user'])->toJson();
@@ -171,6 +174,7 @@ class EpisodeController extends Controller
                ]);
 
                $episode->channels()->updateExistingPivot($channel, $validatedChanges);
+               $episode->touch();
 
                return $episode->load('channels')->toJson();
        }
@@ -185,6 +189,7 @@ class EpisodeController extends Controller
                $this->authorize('removeEpisode', $channel);
 
                $episode->channels()->detach($channel);
+               $episode->touch();
 
                return $episode->load('channels')->toJson();
        }