PHPackages                             susheelbhai/laratsapp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. susheelbhai/laratsapp

ActiveLibrary[HTTP &amp; Networking](/categories/http)

susheelbhai/laratsapp
=====================

this packae can be used to send whatsapp message using some service providers api

v2.2.1(4mo ago)0300↑25%MITPHP

Since Sep 29Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/susheelbhai/laratsapp)[ Packagist](https://packagist.org/packages/susheelbhai/laratsapp)[ RSS](/packages/susheelbhai-laratsapp/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (10)Used By (0)

Send WhatsApp message to custom phone number
============================================

[](#send-whatsapp-message-to-custom-phone-number)

Installation
------------

[](#installation)

### Laravel

[](#laravel)

Require this package in your composer.json and update composer. This will download the package.

```
composer require susheelbhai/laratsapp

```

Configuration
-------------

[](#configuration)

### Vendor Publish

[](#vendor-publish)

Publish config files using the following command

```
php artisan vendor:publish --tag="whatsapp" --force

```

### Final Step

[](#final-step)

Add environment valriable by runnung the command

```
php artisan whatsapp:update_env

```

go to .env file and put value of the required variables

### Application Guide

[](#application-guide)

Import facade at the top of the class after namespace

```
use WhatsApp;

```

Create $data variable and call the facade

Text message example

```
$data = [
            'phone' => '9999999999',
            'message' => 'message content'
        ];
WhatsApp::sendText($data);

```

Text otp example

```
$data = [
            'phone' => '9999999999',
            'message' => 'otp'
        ];
WhatsApp::sendOTP($data);

```

Media message example

```
$data = [
            'phone' => '9999999999',
            'message' => 'message content',
            'media_url' => 'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf'
        ];
WhatsApp::sendMedia($data);

```

Make sure media url is available on live server and accessible publicly

You can aslo use this package with laravel notification class
-------------------------------------------------------------

[](#you-can-aslo-use-this-package-with-laravel-notification-class)

### add channel name whatsapp in via method. following is the example

[](#add-channel-name-whatsapp-in-via-method-following-is-the-example)

```
public function via(object $notifiable): array
    {
        $channels = [];
        if (config('mail.send_mail') == 1 && isset($notifiable->email)) {
            $channels[] = 'mail';
        }
        if (config('whatsapp.send_msg') == 1 && isset($notifiable->phone)) {
            $channels[] = 'whatsapp';
        }
        return $channels;
    }

```

### Now add the other method by which you want to send the message. you can use 1 or more from the following

[](#now-add-the-other-method-by-which-you-want-to-send-the-message-you-can-use-1-or-more-from-the-following)

```
 public function toWhatsAppText($notifiable)
    {
        return 'Thank you for contacting '.config('app.name').'. We have received your message and will get back to you shortly.';
    }

```

```
 public function toWhatsAppOTP($notifiable)
    {
        return '223344';
    }

```

```
 public function toWhatsAppPdf($notifiable)
    {
        return [
            'message' => 'Thank you for contacting '.config('app.name').'. We have received your message and will get back to you shortly.',
            'media_url' => "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
        ];
    }

```

```
 public function toWhatsAppMedia($notifiable)
    {
        return [
            'message' => 'Thank you for contacting '.config('app.name').'. We have received your message and will get back to you shortly.',
            'media_url' => "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
        ];
    }

```

### License

[](#license)

This Multi Auth Package is developed by susheelbhai for personal use software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance77

Regular maintenance activity

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~103 days

Total

9

Last Release

127d ago

Major Versions

v1.0.1 → v2.0.02024-01-27

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d324a9930fc536f84b495c972521e05384cefea99250652c702e134757ea47f?d=identicon)[susheelbhai](/maintainers/susheelbhai)

---

Top Contributors

[![susheelbhai](https://avatars.githubusercontent.com/u/64020920?v=4)](https://github.com/susheelbhai "susheelbhai (10 commits)")

### Embed Badge

![Health badge](/badges/susheelbhai-laratsapp/health.svg)

```
[![Health](https://phpackages.com/badges/susheelbhai-laratsapp/health.svg)](https://phpackages.com/packages/susheelbhai-laratsapp)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
