承接 saeed/otp 相关项目开发

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

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

saeed/otp

Composer 安装命令:

composer require saeed/otp

包简介

otp for send password to whatsapp 1

README 文档

README

This guide walks you through setting up the OTP (One-Time Password) authentication package for your Laravel project.

Prerequisites

  1. A UltraMsg account.
  2. Laravel installed on your project.

Setup Instructions

1. Register for UltraMsg

  • Visit UltraMsg and create an account.
  • Obtain the following credentials:
    • Instance
    • Token

2. Install the OTP Package

Run the following command in your Laravel project terminal:

composer require saeed/otp:dev-main

3. Update Composer Autoload

  1. Open your composer.json file.

  2. Add the following line to the autoload section:

    "Saeed\\Otp\\": "src/"
  3. Run the following command to update the autoloader:

    composer dump-autoload

4. Configure the Service Provider

  1. Open the config/app.php file.

  2. Add the service provider to the providers array:

    Saeed\Otp\OtpServiceProvider::class,
  3. Add an alias to the aliases array:

    'Otp' => Saeed\Otp\OtpFacade::class,

5. Update Authentication Providers

  1. Open the config/auth.php file.

  2. Replace the default model entry with the OTP User model:

    'model' => \Saeed\Otp\Models\OtpUser::class,

6. Publish Configuration File

To publish the package configuration, run:

php artisan vendor:publish --provider="Saeed\Otp\OtpServiceProvider" --tag="otp" --force

7. Configure Instance and Token

  1. Open the published configuration file: config/otp.php.

  2. Add your UltraMsg credentials:

    'WhatsApp_Instance' => 'your_instance',
    'WhatsApp_Token' => 'your_token',

8. Run Database Migrations

Run the following command to create the required database tables:

php artisan migrate

9. Create a Home Page

You can now create a home page in your application to implement and utilize OTP functionality.

Notes

  • Ensure you have your .env file properly configured for database and app settings before running migrations.
  • For more details and advanced usage, refer to the package documentation or contact the package maintainer.

Happy Coding! 🚀

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 1
  • 开发语言: CSS

其他信息

  • 授权协议: Unknown
  • 更新时间: 2025-01-07