diff --git a/app/Http/Controllers/Api/UserVoteOptionContoller.php b/app/Http/Controllers/Api/UserVoteOptionContoller.php index 05b1182..3d493d0 100644 --- a/app/Http/Controllers/Api/UserVoteOptionContoller.php +++ b/app/Http/Controllers/Api/UserVoteOptionContoller.php @@ -36,6 +36,7 @@ public function index(Request $request) */ public function store(InsertUserVoteRequest $request) { + $option = Option::Find($request->input('option_id')); if(!isset($option)){ return response()->json($this->setErrorResponse(myResponse::OPTION_NOT_EXISTS, __('The given data was invalid.'),