Download the PHP package winalco/laravel-sms without Composer

On this page you can find all versions of the php package winalco/laravel-sms. 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-sms

winalco/laravel-sms

Send SMS from your Laravel application through the Winalco relay: transactional sending, database tracking, signed status webhook.

1. Create your account and API key

The code in this package is free (MIT), but sending goes through the Winalco platform: you need an account and an API key.

👉 Create an account / open the console

Free plan, an email address is all it takes, no credit card. Service overview and pricing: https://sms-relay.winalco.dz

Once logged in, go to console → API Keys and create a key. You get a wak_... token that is shown only once — copy it right away.

The status webhook field on that same page is used in step 4 — leave it empty for now, until your application is deployed.

2. Install the package

In your .env:

To tweak the configuration: php artisan vendor:publish --tag=winalco-sms-config.

3. Send an SMS

Sends go through the Winalco\Sms\Jobs\SendSms job, so a queue worker must be running. On shared hosting, a one-minute cron is enough:

Need something lower level? Winalco\Sms\WinalcoSms exposes send(), sendBulk() (max 500 numbers), usage() (quotas) and status($id).

Message length: stay ≤ 160 characters and avoid ê â î ô û ç (silently switches to UCS-2, i.e. 70 characters per segment).

4. Receive delivery statuses (webhook)

The package already exposes the POST /api/webhooks/winalco-sms route: HMAC-SHA256 signature verified, duplicates ignored, final statuses (sent, failed, canceled) written to the sms_messages row. Nothing to code.

Do it in this order, otherwise the relay will push statuses into the void:

  1. Deploy the code and run php artisan migrate in production.
  2. In console → API Keys, set the status webhook to https://your-domain.tld/api/webhooks/winalco-sms (HTTPS and publicly reachable — no localhost).
  3. Copy the whs_... secret, shown only once, into WINALCO_SMS_WEBHOOK_SECRET.
  4. Clear the cache: php artisan config:clear.

As long as WINALCO_SMS_WEBHOOK_SECRET is empty, every incoming request is rejected with a 403 — that is intentional. If you disable then re-enable the webhook in the console, a new secret is issued: update your .env.

Note: the sent status means "handed to the mobile network", not "received by the recipient".

5. Data retention

Every sms_messages row keeps the recipient's number and the message body — often an OTP or a payment reference. Nothing is deleted by default. To purge, set a duration and schedule model:prune:

Phone numbers never appear in clear text in the package logs (only the last 3 digits are kept).

Compatibility

Laravel 10, 11, 12 and 13 · PHP 8.1+.

Help

Code under the MIT license. The sending service itself (relay, SIM cards, quotas) is provided by the Winalco platform and requires an account.


All versions of laravel-sms with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
guzzlehttp/guzzle Version ^7.2
illuminate/bus Version ^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^10.0|^11.0|^12.0|^13.0
illuminate/queue Version ^10.0|^11.0|^12.0|^13.0
illuminate/routing Version ^10.0|^11.0|^12.0|^13.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 winalco/laravel-sms contains the following files

Loading the files please wait ...