public function confirm($id) { // Confirm changes using a command and a handler, again this would normally be done via mapping // and maybe split across some files. $command = new ConfirmPendingChangesCommand(TaskListId::fromString($id)); $this->taskListService->handleConfirmPendingChanges($command); return redirect()->route('lists.show', [$id, 'success' => true]); }