akiyamaSM / larapoll

A Laravel package to manage your polls
MIT License
260 stars 58 forks source link

Check if auth user has voted and then take count of polls ? #119

Closed jyrjsinhatfolium closed 2 years ago

jyrjsinhatfolium commented 2 years ago

Hi,

Thank you for your package. I encountered an issue that blocks my way forward.

I have tried getting count of polls as of now as shown below:

image

As of Now I am thinking that this below function would have help me but i am not sure.......`

image

Simply i had made a poll box in my website and i want to show the count of polls in right corner of that box.

  1. i need the count of poll in which user has not voted.
  2. if user votes on poll it should remove from count as well.

If anyone can help , the response would much appreciated..

Thanks..

Temian1 commented 2 years ago

goto laracast.com and ask

jyrjsinhatfolium commented 2 years ago

@Temian1 Thanks for your suggestion but I have solved the issue by the following code....

image

in the ($unvotedpolls) I have got the polls number which current user has not voted.....