• 总结7.19 laravel验证码


    先在终端安装扩展包

    composer require mews/captcha;

    可以在config/app.php文件中修改验证码配置

      'providers' => [

        MewsCaptchaCaptchaServiceProvider::class,

      ],

      'aliases' => [

        'Captcha' => MewsCaptchaFacadesCaptcha::class,

      ],

    'characters' =>'',

    'default' =>[],

    'flat' =>",

    'mini' =>[],

    在视图文件中

    使用captcha_img()或者captcha_src()即可显示验证码

    控制器中

    validator(['captcha'=>"required|captcha"]);

    //验证验证码

  • 相关阅读:
    Python之sys & os
    1161
    1142
    P1599 货币
    P1547逆转,然后再见
    P1629八
    P1753HackSon的趣味题
    Problem 2233 ~APTX4869
    1269
    1091. Tmutarakan Exams
  • 原文地址:https://www.cnblogs.com/HighKK/p/13496085.html
Copyright © 2020-2023  润新知