monaz/vt-laravel-rules 问题修复 & 功能扩展

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

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

monaz/vt-laravel-rules

最新稳定版本:v0.1-beta

Composer 安装命令:

composer require monaz/vt-laravel-rules

包简介

Set of useful validation rules using VirusTotal API for Laravel

README 文档

README

This package provides a set of useful validation rule to get scan reports of files, urls, domains and ips.

This is based on my other library PHP client library for VirusTotal Public API v3.0.

Installation:

Install using composer by running:

composer require monaz/vt-laravel-rules

Or include the following in your composer.json:

{
  "require": {
    "monaz/vt-laravel-rules": "dev-master"
  }
}

Then run:

composer update

Then publish the package assets including the config and translation files:

php artisan vendor:publish --tag=vt-laravel

By publishing the assets you will see a virus-total.php in your default config dir. Make sure to acquire a suitable API key from VirusTotal and put it in the config page. Instead of always changing the config file, you can also set the VIRUS_TOTAL_API_KEY key in your .env file.

Usage:

See the following basic usage example

<?php

use Monaz\LaravelVirusTotal\Rules\File;
use Monaz\LaravelVirusTotal\Rules\Url;
use Monaz\LaravelVirusTotal\Rules\Ip;
use Monaz\LaravelVirusTotal\Rules\Domain;

// somewhere in your validators
public function rules()
{
    return [
        'my_file' => ['file', new File()],
        'my_url' => ['url', new Url()],
        'my_ip' => ['ip', new Ip()],
        'my_domain' => ['string', new domain()]
    ];
}
?>

Contributing

Thank you for considering contributing to the library! Just fork and when you are done make an PR. Just make sure you run the tests before submitting your request.

You can run the phpunit tests using this command:

"vendor/bin/phpunit" --coverage-text --configuration phpunit.xml.dist tests

License

The library is open-sourced software licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-04-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固