Skip to content

bugdev304/whatsappsimplemessage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A&3 Logo

Whatsapp Simple Message

Pacote para envio de mensagem simples pelo Whatsapp utilizando a plataforma Z-API

Requisitos

  • PHP >= 7.4
  • Laravel >= 8.0

Como configurar o projeto?

  1. Adicione este repositório à lista de repositórios do composer em seu projeto laravel.
{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/bugdev304/whatsappsimplemessage.git"
    }
  ]
}

  1. Execute o comando a seguir para baixar esta lib ao vendor do seu projeto.
composer require pablo/whatsappsimplemessage
  1. Configure as variáveis abaixo no .env do seu projeto.
WHATSAPP_ENABLED=true
BASE_URL=https://example.com
INSTANCE=https://example.com
INSTANCE_TOKEN=1234567890
SECURITY_TOKEN=1234567890
DEFAULT_NOTIFICATION_NUMBER=YYXXNNNNNNNNN -> DDI+DDD+NUMERO
SEND_URL=send-text
DEFAULT_COUNTRY_DDI=55
WHATSAPP_DELAY_TYPING=5
WHATSAPP_DELAY_MESSAGE=10
  1. Execute o comando abaixo para publicar o arquivo de configuração do pacote.
php artisan vendor:publish --tag=whatsapp-config
  1. Model Notifiable
use Pablo\Whatsappsimplemessage\app\Notifications\SimpleMessageNotification;

class User extends Authenticatable
{
    use Notifiable;

    public function routeNotificationForWhatsapp()
    {
        return $this->phone;
    }
}
  1. Enviar mensagem
$user = \App\Models\User::first();
$user->notify(new \Pablo\Whatsappsimplemessage\app\Notifications\SimpleMessageNotification('Teste'));

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages