I want to stop a user from voting twice and redirect them to the result page.
Controller
public function view_survey(Survey $survey)
{
$survey->option_name = unserialize($survey->option_name);
$answers = \App\Answer::pluck('Answer', 'id')->toArray();
return view('survey.view', compact('survey', 'answers'));
}
Tables: Table of Answers