uzbek / eskiz-sms-client
Eskiz.uz sms client
Installs: 96
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 2
Open Issues: 4
pkg:composer/uzbek/eskiz-sms-client
Requires
- php: ^8.3
- illuminate/contracts: ^11.0|^12.0
- illuminate/http: ^11.0|^12.0
- spatie/laravel-package-tools: ^1.92
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.92
- larastan/larastan: ^3.8
- nunomaduro/collision: ^8.8
- orchestra/testbench: ^9.0|^10.0
- pestphp/pest: ^3.8|^4.0
- pestphp/pest-plugin-laravel: ^3.0|^4.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpunit/phpunit: ^11.5|^12.0
- spatie/laravel-ray: ^1.43
- dev-main
- 1.1.0
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-dependabot/github_actions/dependabot/fetch-metadata-2.5.0
- dev-dependabot/github_actions/stefanzweifel/git-auto-commit-action-7
- dev-dependabot/github_actions/ramsey/composer-install-3
- dev-dependabot/github_actions/actions/checkout-6
- dev-claude/laravel-version-support-qIO1C
- dev-dependabot/github_actions/stefanzweifel/git-auto-commit-action-5
- dev-dependabot/github_actions/actions/checkout-4
- dev-dependabot/github_actions/ramsey/composer-install-2
This package is auto-updated.
Last update: 2026-01-26 22:46:15 UTC
README
Eskiz.uz sms client for Laravel.
Requirements
- PHP 8.3+
- Laravel 11.x or 12.x
Installation
You can install the package via composer:
composer require uzbek/eskiz-sms-client
You can publish the config file with:
php artisan vendor:publish --tag="eskiz-sms-client-config"
Add the following environment variables to your .env file:
ESKIZ_SMS_EMAIL=your-email@example.com ESKIZ_SMS_PASSWORD=your-password ESKIZ_SMS_FROM=4546
Usage
Sending SMS
use Uzbek\EskizSmsClient\Facades\Sms; // Basic usage $response = Sms::send('998901234567', 'Hello from Laravel!'); if ($response->isOk()) { echo "SMS sent! ID: " . $response->id; } // With custom sender $response = Sms::send('998901234567', 'Hello!', 'CustomSender');
Getting User Info
$user = Sms::user(); echo $user->name; // User name echo $user->email; // User email echo $user->balance; // Account balance echo $user->isActive(); // true/false
Checking Limits
$limits = Sms::limits(); echo $limits->limit; // Total limit echo $limits->used; // Used count echo $limits->remaining; // Remaining count echo $limits->usagePercentage(); // Usage percentage (e.g., 25.5) echo $limits->hasRemaining(); // true/false
Getting Balance
$balance = Sms::balance();
Refreshing Token
Sms::refreshToken();
Exception Handling
The package throws specific exceptions for different error scenarios:
use Uzbek\EskizSmsClient\Exceptions\AuthenticationException; use Uzbek\EskizSmsClient\Exceptions\RateLimitException; use Uzbek\EskizSmsClient\Exceptions\EskizException; try { $response = Sms::send('998901234567', 'Hello!'); } catch (AuthenticationException $e) { // Invalid credentials or token issues } catch (RateLimitException $e) { // Too many requests $retryAfter = $e->retryAfter; // Seconds to wait } catch (EskizException $e) { // Other API errors $response = $e->response; // Raw API response }
Response Objects
All methods return typed response objects:
SendResponse- SMS send result withid,status,message,phoneUserResponse- User info withid,name,email,role,status,balance,isVipLimitResponse- Limits info withlimit,used,remaining,resetAt
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.