承接 tagmood/laravel-disposable-phone 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

tagmood/laravel-disposable-phone

最新稳定版本:3.0.57

Composer 安装命令:

composer require tagmood/laravel-disposable-phone

包简介

Disposable phone validator

README 文档

README

Adds a validator to Laravel for checking whether a given phone number isn't originating from disposable phone services. Uses the disposable numbers blacklist from iP1SMS/disposable-phone-numbers by default.

Installation

  1. Run the Composer require command to install the package:

    composer require tagmood/laravel-disposable-phone
  2. If you don't use auto-discovery, open up your app config and add the Service Provider to the $providers array:

    'providers' => [
       ...
    
       Tagmood\LaravelDisposablePhone\DisposablePhoneServiceProvider::class,
    ],
  3. Publish the configuration file and adapt the configuration as desired:

    php artisan vendor:publish --tag=laravel-disposable-phone
  4. Run the following artisan command to fetch an up-to-date list of disposable numbers:

    php artisan disposablephone:update
  5. (optional) In your languages directory, add for each language an extra language line for the validator:

    'indisposablephone' => 'Disposable phone numbers are not allowed.',
  6. (optional) It's highly advised to update the disposable numbers list regularly. You can either run the command yourself now and then or, if you make use of Laravel's scheduler, include it over there (App\Console\Kernel):

    protected function schedule(Schedule $schedule)
    {
        $schedule->command('disposablephone:update')->weekly();
    }

Usage

Use the indisposablephone validator to ensure a given field doesn't hold a disposable phone number.

'field' => 'indisposablephone',

Custom fetches

By default the package retrieves a new list by using file_get_contents(). If your application has different needs (e.g. when behind a proxy) please review the disposable-phone.fetcher configuration value.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-08-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固