承接 ahmednabil94/wa-integration 相关项目开发

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

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

ahmednabil94/wa-integration

Composer 安装命令:

composer require ahmednabil94/wa-integration

包简介

simple laravel package to connect your whatsapp and send messages

README 文档

README

simple laravel package to connect your whatsapp and send messages.

Installation

composer require ahmednabil94/wa-integration

After updating composer, add the ServiceProvider to the providers array in config/app.php.

WAIntegration\WAServiceProvider::class, 

Optionally you can use the Facade for shorter code. Add this to your facades:

'Instance' => WAIntegration\Facades\InstanceFacade::class, 
'Message' => WAIntegration\Facades\MessageFacade::class, 

more is coming soon.

Finally you can publish the config file:

 php artisan vendor:publish --provider="WAIntegration\WAServiceProvider"  

Configuration

The main change to this config file (config/wa_integration.php) will be filled with your channel credentials.

For example, when loaded with composer, the line should look like:

 'id'                    => env('WA_CHANNEL_ID','YOUR_CHANNEL_ID_HERE'),
 'token'                 => env('WA_CHANNEL_TOKEN','YOUR_CHANNEL_TOKEN_HERE'),
 'identifier'            => env('WA_IDENTIFIER','YOUR_CHANNEL_OWNER_IDENTIFIER_HERE'), 

Usage

You can create a new (Message or Instance) instance and begin sending messages or fetching qr & account activity status.

Use the facade:

- Instance Facade

   Instace::qr()

To fetch current qr

   Instance::status() 

To Check If account status is active or disconnected

   Instance::disconnect() 

Disconnect Channel Connection

   Instance::clearInstance() 

Delete Channel, becareful when trying to use it

   Instance::clearInstanceData() 

Clear all files associated with channel

- Message Facade

   Message::send([
      'phone' => '965xxxxxxxx',
      'body'  => 'Your Message Body Here'
   ]) 

Send Text Message Via Whatsapp
Note: Your Connection status must be connected it means that you had already scanned QR.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2023-09-21