From 6755e740a254d7cf94f0d65434ede671c0ccc9ef Mon Sep 17 00:00:00 2001 From: Yoga Pangestu Date: Mon, 6 Apr 2026 00:01:07 +0700 Subject: [PATCH] fix: update back action to return to previous page or assignment index --- .../Learning/Assignments/Pages/SubmitAssignmentPage.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Filament/Resources/Learning/Assignments/Pages/SubmitAssignmentPage.php b/app/Filament/Resources/Learning/Assignments/Pages/SubmitAssignmentPage.php index 6fe3b4c..2460f17 100644 --- a/app/Filament/Resources/Learning/Assignments/Pages/SubmitAssignmentPage.php +++ b/app/Filament/Resources/Learning/Assignments/Pages/SubmitAssignmentPage.php @@ -310,9 +310,10 @@ public function submit(): void protected function getHeaderActions(): array { + return [ BackAction::make() - ->url(AssignmentResource::getUrl()), + ->url(url()->previous() ?? AssignmentResource::getUrl('index')), ]; } }