akiyamaSM / larapoll

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

Some issues-logic params #96

Closed Steven73041 closed 3 years ago

Steven73041 commented 4 years ago

Hello, first of all trying to follow 100% of documentation gives error of using static method

you have to pass an instance of PollWriter in the view OR

@php
    use Inani\Larapoll\Helpers\PollWriter;
    use Inani\Larapoll\Poll;
                   $pollwriter = new PollWriter();
                    @endphp
                    {{ $pollwriter->draw(2) }}

etc.

The option "Allow to guests" doesn't update, the value that gets from the creation doesn't get updated in edit of "Poll", Also I need to modify vendor/inani/larapoll/src/helpers/PollWriter.php to achieve voting without showing results, I want someone to be able to vote but not able to see the results yet.

The following project is what i am about to develop, I don't know yet if i am going to use this package or not, If i had free time and you give me motivation i would like to try contribute in this one.

Project:

One admin can create Categories of Polls, (categories are sector of workers), admin can create Polls attached to categories, admin can add options, admin will add several e-mails and send link of login with usrename/password and give access ONLY to one or more categories and its Polls. No one can see results of voting. When admin closes the Poll, then everyone attached to it will receive e-mail with results AND link to view results! I can create it from scratch but I am thinking of using this and develop it up there, what is your opinion people?

akiyamaSM commented 4 years ago

Thanks for your feedback, I'll be looking at the points you mentioned. feel free to submit your PR. I'll be happy to merge it.

akiyamaSM commented 4 years ago

@Steven73041 you have to clear the cache of the app and bring the latest version, you will like it. Btw no need to instanite the helper class

{{ PollWriter::draw(2) }}