File tree 1 file changed +21
-1
lines changed
1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,12 @@ class PollController extends Controller
17
17
18
18
protected $ limit = 15 ;
19
19
20
+ /**
21
+ * All surveys for a specific user
22
+ * Все опросы для конкретного пользователя
23
+ *
24
+ * @return void
25
+ */
20
26
public function index ()
21
27
{
22
28
$ polls = PollModel::getUserQuestionsPolls (Html::pageNumber (), $ this ->limit );
@@ -36,6 +42,12 @@ public function index()
36
42
);
37
43
}
38
44
45
+ /**
46
+ * View the survey
47
+ * Просмотр опроса
48
+ *
49
+ * @return void
50
+ */
39
51
public function poll ()
40
52
{
41
53
$ id = Request::param ('id ' )->asInt ();
@@ -52,11 +64,19 @@ public function poll()
52
64
);
53
65
}
54
66
67
+ /**
68
+ * Choosing an option in the survey
69
+ * Выбор варианта в опросе
70
+ *
71
+ * @return void
72
+ */
55
73
public function vote ()
56
74
{
57
75
$ question_id = Request::post ('question_id ' )->asInt ();
58
76
$ answer_id = Request::post ('answer_id ' )->asInt ();
59
77
60
- return PollModel::vote ($ question_id , $ answer_id );
78
+ PollModel::vote ($ question_id , $ answer_id );
79
+
80
+ return true ;
61
81
}
62
82
}
You can’t perform that action at this time.
0 commit comments