Skip to content

arifinhabibi/whatsapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

package laravel for whatsapp sending message

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

Country Number Code
Indonesia +62, 62, 0, 8

📝 License

Copyright © 2023 arifinhabibi.
This project is MIT licensed.