fidelo-software/laravel-spamshield 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fidelo-software/laravel-spamshield

Composer 安装命令:

composer require fidelo-software/laravel-spamshield

包简介

Simple spam detection

README 文档

README

Installation

Install the package via composer

composer require fidelo-software/laravel-spamshield

Basic usage

Generate spamshield instance with strategies you want to use

$spamshield = new \FideloSoftware\Spam\SpamShield(
    [
        new \FideloSoftware\Spam\Strategies\HoneypotStrategy(3),
        new \FideloSoftware\Spam\Strategies\TimestampStrategy($store, 5),
        new \FideloSoftware\Spam\Strategies\LinkStrategy(0),
        new \FideloSoftware\Spam\Strategies\ValueBlacklistStrategy(['name' => ['John Doe']]),
    ], 
    $store
    $logger // optional
);

Start all strategies onload processes when form is initializing

// Form initialization 
$spamshield->onload($form, $request);

Include all html parts of defined strategies in your form rendering process

// Form rendering
echo $spamshield->html($form);

Execute all strategies on form submit to check for spam

// Submit
try {
    $spamshield->detect($form, $request);
} catch(\FideloSoftware\Spam\Exceptions\BannedException $e) {
    ...
} catch(\FideloSoftware\Spam\Exceptions\SpamDetectionException $e) {
    ...
}

Check user request globally

// Check if user is globally banned after to many attempts
\FideloSoftware\Spam\SpamShield::isBanned($store, $request);

统计信息

  • 总下载量: 357
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-01-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固