arifinhabibi/whatsapp

laravel whatsapp sending message

v2.0.1 2023-09-13 09:26 UTC

This package is auto-updated.

Last update: 2024-10-20 04:30:35 UTC


README

Latest Stable Version Total Downloads License

I'll tell you how to installation or setup this package into your project laravel, please follow this step.

Requirements Tools

  • php >=7.4 | <8.4
  • composer has been installed on your system

Installation

Install this package with composer and run this on your command.

composer require arifinhabibi/whatsapp

Next step on controller you must declare the origin static method

use arifinhabibi\whatsapp\Whatsapp;

second you can use this syntax into your function controller, and change parameter target number and message

Whatsapp::send("+628238749873", "Helloo world!");

send function have to parameters, on first need a number target which registered on whatsapp, second parameter is message. message can separated with space but not with a new line.

Usage/Examples

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use arifinhabibi\whatsapp\Whatsapp;

class MainController extends Controller
{
    public function send(Request $request)
    {
        return Whatsapp::send($request->phone, $request->message);
    }
}

Requirements Number Target

Is number target must started with number code

📝 License

Copyright © 2023 arifinhabibi.
This project is MIT licensed.