Skip to content

installation

alizeinodin edited this page Sep 11, 2026 · 2 revisions

Installation

Requirements

  • PHP 8.1+
  • Laravel 10 / 11 / 12
  • Extensions: mbstring, json, pdo (for logging & OTP vault)

Install

composer require alizeinodin/smsapi
php artisan smsapi:install

Auto-discovery registers SmsApiServiceProvider and the Sms facade alias.

Optional features

Core works without migrations. Enable extras when needed:

php artisan smsapi:install logging      # sms_logs table
php artisan smsapi:install delivery     # DLR webhook + sync
php artisan smsapi:install api          # HTTP send API
php artisan smsapi:install messaging    # messenger driver hints
php artisan smsapi:install balance      # low-balance alerts
php artisan smsapi:install resilience   # circuit breaker + rate limit
php artisan smsapi:install otp          # OTP vault
php artisan smsapi:install all

Publish manually:

php artisan vendor:publish --tag=smsapi-config
php artisan vendor:publish --tag=smsapi-migrations
php artisan vendor:publish --tag=smsapi-mail

Minimal .env

SMSAPI_DRIVER=smsir
SMSAPI_API_KEY=your-api-key
SMSAPI_LINE_NUMBER=30007

# Local / CI without providers:
# SMSAPI_DRIVER=array

Clone this wiki locally