From 1cdbec7d5e4ff1b98422b30543378194ef2e6650 Mon Sep 17 00:00:00 2001 From: Les De Ridder Date: Mon, 22 Oct 2018 22:36:43 +0200 Subject: [PATCH] Fix redirect when trying to vote when already voted --- app/Http/Controllers/PollController.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/Http/Controllers/PollController.php b/app/Http/Controllers/PollController.php index e49d776..8fd4418 100644 --- a/app/Http/Controllers/PollController.php +++ b/app/Http/Controllers/PollController.php @@ -216,10 +216,7 @@ class PollController extends Controller } if($this->hasVoted($request, $poll)) { - return view('view_poll') - ->with('poll', $poll) - ->with('new', false) - ->with('hasVoted', true); + return redirect()->action('PollController@view', ['poll' => $poll]); } if($poll->allow_multiple_answers) {