Larapoll 2.5 : Create Polls easily in Laravel

Larapoll 2.

5 : Create Polls easily in LaravelINANI El HoussainBlockedUnblockFollowFollowingOct 6, 2017VotingBeing able to create system to handle polls and voting is what many people ask, and specifically if you are using a Framework, unless you pay for it you’ll get nothing.

That’s why I decided to implement that kind of scripts, in the way of a Package(checkout the link down).

NotesBefore to start here are some rules that I assumed before creating the package :1 — A pull should have at least two options.

2 — If its a poll with many choices to select, its not possible to check all of them.

3 — You can not edit name of options(to not cheat on the results).

4 — You can not remove a voted option.

Creating PollsCreating polls is one of the easiest things you may do, you only have to provide the question and the two options at least.

[NEW FEATURE] you can now allow guests to vote too, you just need to select the checkbox, easy isn’t it?You can set start and end dates of the poll.

Sorry Messi fans, but Cristiano is the bestModify the poll1- Edit basic informationAfter that you can add more options and after that if you have many options you can remove the ones you want.

You can update the following options.

Edit page2- Add and remove optionsAdd new optionsRemove optionsSo basically you can :lock/unlock the poll.

Edit the number of checkable elements.

Delete the poll.

Integrate the poll in the viewLarapoll provides you a very easy way to integrate the poll in the views, you only have to provide the id of the poll.

Make sure to add the Voter trait in the model of User, not required if the voters are guests.

and its shown like that depending on the type of the poll and of course if the Bootstrap is used.

One option selectShow resultIn case the poll is finished or the user/guest has voted you will be able to see the result of the voting.

Results of the votingOverride viewsThe good news is that you will be able to make your own views for the poll(checkbox or radio) and the results.

ConfigsPlease check the related views of the core for the data that you will have by default.

Repository of LarapollActually the package still have many things to improve in, I Hope that it will be helpful for one of you.

Its always nice for me to receive your comments/stars on the repo.

https://github.

com/akiyamaSM/larapoll.

. More details

Leave a Reply