diff --git a/app/Http/Controllers/VoteController.php b/app/Http/Controllers/VoteController.php index 8e36538..66d8b87 100644 --- a/app/Http/Controllers/VoteController.php +++ b/app/Http/Controllers/VoteController.php @@ -33,6 +33,7 @@ public function create(Request $request) */ public function store(Request $request) { - // + $options = $request['options']; + print_r($options); } } diff --git a/resources/js/components/OptionItemComponent.vue b/resources/js/components/OptionItemComponent.vue index 0fb08ce..a13f0bb 100644 --- a/resources/js/components/OptionItemComponent.vue +++ b/resources/js/components/OptionItemComponent.vue @@ -1,14 +1,14 @@ @@ -18,6 +18,15 @@ export default { props: { option: Object, number: Number, + selected: { + type: Boolean, + default: false, + } + }, + methods: { + handleClick() { + this.$emit('change', { option: this.option, selected: !this.selected }); + } }, mounted() { } diff --git a/resources/js/components/SurveyInstanceComponent.vue b/resources/js/components/SurveyInstanceComponent.vue index d63ac08..4d46eca 100644 --- a/resources/js/components/SurveyInstanceComponent.vue +++ b/resources/js/components/SurveyInstanceComponent.vue @@ -1,30 +1,53 @@