riponcoder / scratch-card
这是一个虚拟刮刮卡
dev-master
2023-09-14 17:31 UTC
This package is auto-updated.
Last update: 2024-09-30 01:41:13 UTC
README
安装
composer require riponcoder/scratch-card
迁移
php artisan migrate
门面
use Ripon\ScratchCard\ScratchCard; OR use ScratchCard;
用法
物品插入刮刮卡
ScratchCard::insertItem([
"Laptop", // Item Name
1, //status 1 mean Active and 0 Unactive
]);
物品更新刮刮卡
ScratchCard::updateItem($id,[ "Laptop", // Item Name 1, //status 1 mean Active and 0 Unactive ]);
刮刮卡插入
ScratchCard::insert([
"Ripon Shikder", //name
"01730000000", //mobile
1, //status 1 mean Active and 0 Unactive
]);
刮刮卡更新
ScratchCard::update($id,[ "Ripon", //name "01730000000", //mobile 1, //status 1 mean Active and 0 Unactive ]);
刮刮卡获取
ScratchCard::ScratchItemGet(30);
每页平均30个分页
通过手机查找刮刮卡
ScratchCard::FindByMobile("01730000000");
通过令牌查找刮刮卡
ScratchCard::TokenbyFind("7tvUzM7uWHl8dLyf2zJWssXvTopMyOYe");
刮刮卡状态为非活动
ScratchCard::ID(1)->StatusDeactive();
刮刮卡状态为活动
ScratchCard::ID(1)->StatusActive();
刮刮卡礼品完成时
ScratchCard::ID(1)->giftDone();
如果您想更改刮刮卡视图,请更改
php artisan vendor:publish --tag=scratch-views
刮刮卡视图URL将是
http://127.0.0.1:8000/scratch-card/7tvUzM7uWHl8dLyf2zJWssXvTopMyOYe