-
Notifications
You must be signed in to change notification settings - Fork 1
Poll Object
Anton Alexeev edited this page Mar 15, 2018
·
7 revisions
'title' : string
'active' : tinyint
'anonymous' : tinyint
'position' : integer
'type' : string - *Type of Poll
'closed_at' : datetime
Available types of Poll:
-
User can get only one Vote (like radio):
\\OrangeShadow\\Polls\\Types\\SingleVote -
User can check some option (like checkbox)
\\OrangeShadow\\Polls\\Types\\MultiVote -
User must specified order by priority
\\OrangeShadow\\Polls\\Types\\VariableVote
You can write your poll type extends from PollTypeAbstract
Get list of option
options() : Illuminate\Database\Eloquent\Relations\HasMany
Check is poll closed or not active
isClosed() : boolean
Get options count
getOptionsCount(): integer
Get number of user who vote of poll
getVoterCount(): integer