2017 © Pedro Peláez
 

library polls

A Laravel package to create your polls

image

orangeshadow/polls

A Laravel package to create your polls

  • Friday, May 18, 2018
  • by orangeshadow
  • Repository
  • 2 Watchers
  • 2 Stars
  • 37 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 9 % Grown

The README.md

Polls package for Laravel

Install

composer require orangeshadow/polls:dev-master, (*1)

then copy config, migration and lang, (*2)

php artisan vendor:publish OrangeShadow\\Polls\\SeriviceProvider, (*3)

run migration, (*4)

php artisan migrate, (*5)

Config

polls.php, (*6)

routing - enable or disable routing, (*7)

admin_route_prefix - prefix for manage polls API route, (*8)

admin_route_middleware - array middleware for manage polls route, (*9)

public_route_prefix - prefix for public API route, (*10)

public_route_middleware - array for manage polls route, (*11)

paginate - count items returned from api, (*12)

Objects

Routes

admin route:, (*13)

Poll API, (*14)

GET: /admin/poll - Get poll list

POST: /admin/poll - Store Poll  

GET: /admin/poll/{poll} - Show poll

PUT: /admin/poll/{poll} - Update poll

DELETE: /admin/poll/{poll} - Remove poll

POST: /admin/poll/{poll}/close - Close Poll

Option API, (*15)

GET: /admin/option - Get option list

POST: /admin/option - Store Option

GET: /admin/option/{option} - Show option

PUT: /admin/option/{option} - Update option

DELETE: /admin/option/{option}  Remove option

public route for get poll with options (and result if user did voted), (*16)

Poll API, (*17)

POST: poll/{poll}

public route for voting (only for auth user), (*18)

Poll API, (*19)

POST: poll/{poll}/vote
FORM-DATA: {
    options: array 
}

Facade PollProxy

$pollProxy = app('PollPropxy',['poll'=>$poll])

Save Vote:, (*20)

$pollProxy->voting($user_id,$options);

Get Result Array:, (*21)

$pollProxy->getResult();

The Versions

18/05 2018

dev-master

9999999-dev

A Laravel package to create your polls

  Sources   Download

MIT

The Requires

 

The Development Requires

by Anton Alexeev

laravel vote polls

02/04 2018

0.0.1

0.0.1.0

A Laravel package to create your polls

  Sources   Download

MIT

The Requires

 

The Development Requires

by Anton Alexeev

laravel vote polls