oliver-garfield / vote
投票类
v1.0.4
2021-04-17 20:29 UTC
Requires
- php: >=7.1.0
- ext-json: *
- doctrine/cache: 1.10.*
- vectorface/whip: ^0.4.0
This package is auto-updated.
Last update: 2025-03-18 04:49:16 UTC
README
安装
composer require oliver-garfield/vote
使用
<?php use OliverGarfield\Vote\VoteFacade; include_once "vendor/autoload.php"; $config = [ "ip_nums"=>5 //每个ip可投票次数 ]; try { $vote = new VoteFacade($config); } catch (Exception $e) { } if(VoteFacade::checkCan()) { VoteFacade::setNum(); // 成功 } else { // 失败,投票次数已经用尽 }