Download the PHP package crenspire/laravel-whatsapp without Composer

On this page you can find all versions of the php package crenspire/laravel-whatsapp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-whatsapp

Laravel WhatsApp Business API Package

Latest Version on Packagist Total Downloads Build Status Test Coverage PHP Version Laravel Version License StyleCI

A comprehensive Laravel package for integrating with the WhatsApp Business Cloud API. This package provides a clean, easy-to-use interface for sending messages, handling webhooks, managing media, and supporting multi-tenant applications.

Features

Installation

1. Install the Package

2. Publish Configuration

3. Configure Environment Variables

Add these variables to your .env file:

4. Set Up Webhook Routes

The package automatically registers webhook routes. Make sure your webhook URL is configured in your WhatsApp Business API settings:

Quick Start

Basic Usage

Using the Service Directly

Message Types

Text Messages

Media Messages

Template Messages

Interactive Messages

Button Messages

List Messages

Media Management

Upload Media

Download Media

Multi-tenant Support

Configure multiple WhatsApp Business accounts:

Use tenant-specific configuration:

Webhook Handling

Event Listeners

The package dispatches several events that you can listen to:

Example Event Listener

Error Handling

The package throws WhatsappException for various error conditions:

Rate Limiting

The package includes built-in rate limiting to respect WhatsApp API limits:

Logging

Enable debug logging:

Or set in your .env:

Testing

Run the test suite:

The package includes comprehensive tests covering all functionality.

Security

Webhook Verification

The package automatically verifies webhook signatures when WHATSAPP_WEBHOOK_SECRET is configured:

Phone Number Validation

All phone numbers are validated before sending messages to ensure they meet WhatsApp's requirements.

🔧 Custom Headers Support

The package now supports custom headers for all API requests, allowing you to add authentication, tracking, or other custom headers:

Basic Usage

Multi-tenant Headers

Configure per-tenant headers in your configuration:

Default Headers

Set default headers for all requests:

Header Priority

Headers are merged in the following order (later overrides earlier):

  1. Default headers from configuration
  2. Tenant-specific headers
  3. Custom headers passed to individual methods

Configuration Reference

See Configuration for detailed configuration options.

API Reference

See API Reference for complete method documentation.

Enhanced Features

New Message Types

The package now supports all WhatsApp Cloud API message types:

Fluent API

Use the new builder patterns for cleaner code:

Business Profile Management

Enhanced Media Management

Examples

See Examples for real-world usage examples.

Troubleshooting

See Troubleshooting for common issues and solutions.

Contributing

Contributions are welcome! Please see Contributing for guidelines.

License

This package is open-sourced software licensed under the MIT license.


All versions of laravel-whatsapp with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/contracts Version ^10.0|^11.0|^12.0
spatie/laravel-package-tools Version ^1.14
nesbot/carbon Version ^2.0|^3.0
guzzlehttp/guzzle Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package crenspire/laravel-whatsapp contains the following files

Loading the files please wait ...