<?php

namespace App\Providers;

use Illuminate\Support\Facades\Validator;
use Illuminate\Support\ServiceProvider;
use Illuminate\Pagination\Paginator;
class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }

    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        // 扩展表单验证邮件验证码校验规则
        Validator::extend('check_code', 'App\Rules\CheckCode@passes');
        // 扩展表单验证小时步数数据规则
        Validator::extend('check_step_hour', 'App\Rules\CheckStepHour@passes');
        // 扩展表单验证小时步数数据规则
        Validator::extend('check_hex_uid', 'App\Rules\CheckHexUid@passes');
        // 扩展表单验证小时步数数据规则
        Validator::extend('phone', 'App\Rules\Phone@passes');
        // 使用 Bootstrap CSS 构建的分页视图
        Paginator::useBootstrap();
    }
}
