Larawaba is a lightweight and efficient Laravel SDK for interacting with the WhatsApp Business Cloud API (Meta). Designed for ease of use with auto-discovery features, automatic webhook management, and an event-driven architecture.
- Zero Config Webhook: Automatic verification and webhook handler.
- Event-Driven: Uses Laravel Event
MessageReceivedto process incoming messages. - Fluent Messaging: Send text messages with a single line of code.
- Auto-Discovery: Automatically registered in your Laravel application.
composer require junandia/larawabaAdd your credentials to your .env file:
WABA_TOKEN=your-meta-access-token
WABA_PHONE_ID=your-phone-number-id
WABA_VERIFY_TOKEN=your-custom-verify-token
WABA_GRAPH_VERSION=v20.0use Junandia\Larawaba\WhatsAppClient;
$wa = app(WhatsAppClient::class);
$wa->sendText('628123456789', 'Hello from Larawaba SDK!');Register the listener in AppServiceProvider.php:
use Junandia\Larawaba\Events\MessageReceived;
use App\Listeners\ProcessWhatsAppMessage;
use Illuminate\Support\Facades\Event;
Event::listen(MessageReceived::class, ProcessWhatsAppMessage::class);Larawaba adalah SDK Laravel yang ringan dan efisien untuk berinteraksi dengan WhatsApp Business Cloud API (Meta). Didesain untuk kemudahan penggunaan dengan fitur auto-discovery, manajemen webhook otomatis, dan arsitektur berbasis event.
- Zero Config Webhook: Verifikasi dan handler webhook otomatis.
- Event-Driven: Menggunakan Event Laravel
MessageReceiveduntuk memproses pesan masuk. - Fluent Messaging: Kirim pesan teks hanya dengan satu baris kode.
- Auto-Discovery: Otomatis terdaftar di aplikasi Laravel Anda.
composer require junandia/larawabaTambahkan kredensial WhatsApp Business Anda ke dalam file .env:
WABA_TOKEN=token-akses-meta-anda
WABA_PHONE_ID=id-nomor-telepon-anda
WABA_VERIFY_TOKEN=token-verifikasi-custom-anda
WABA_GRAPH_VERSION=v20.0use Junandia\Larawaba\WhatsAppClient;
$wa = app(WhatsAppClient::class);
$wa->sendText('628123456789', 'Halo dari Larawaba SDK!');Daftarkan listener di AppServiceProvider.php:
use Junandia\Larawaba\Events\MessageReceived;
use App\Listeners\ProcessWhatsAppMessage;
use Illuminate\Support\Facades\Event;
Event::listen(MessageReceived::class, ProcessWhatsAppMessage::class);The MIT License (MIT). See LICENSE for more information.