jadessoriano / laravel-mobivate-sdk
Mobivate SDK using Laravel PHP
Fund package maintenance!
:vendor_name
Requires
- php: ^8.2
- ext-json: *
- illuminate/contracts: ^10.0||^11.0||^12.0
- jadessoriano/mobivate-sdk-php: ^1.0.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^2.9||^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^10.0.0||^9.0.0||^8.22.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- phpstan/extension-installer: ^1.3||^2.0
- phpstan/phpstan-deprecation-rules: ^1.1||^2.0
- phpstan/phpstan-phpunit: ^1.3||^2.0
- rector/rector: ^2.0.9
- spatie/laravel-ray: ^1.35
- ticketswap/phpstan-error-formatter: ^1.1
README
Mobivate SDK for Laravel
This package uses jadessoriano/mobivate-sdk-php
Installation
You can install the package via composer:
composer require jadessoriano/laravel-mobivate-sdk
You can publish the config file with:
php artisan vendor:publish --provider="Jadessoriano\LaravelMobivate\LaravelMobivateServiceProvider" --tag="mobivate-sdk-config"
This is the contents of the published config file:
return [ 'api_key' => env('MOBIVATE_API_KEY'), 'originator' => env('MOBIVATE_ORIGINATOR'), ];
Send Single SMS Message
use Mobivate; Mobivate::sendSingle( recipient: '6xxxxxxxxxxx', body: 'This is a test message.', originator: '6xxxxxxxxxxx', // Optional: defaults to config value if not provided reference: 'sample', // Optional: defaults to null if not provided campaignId: '1-xxx' // Optional: defaults to null if not provided );
Send Batch SMS Message
use Mobivate; /** * Note: The schedule date time (for later delivery) is optional, defaults to null if not provided. */ Mobivate::sendBatch( messages: [ new BatchMessageItem( originator: 'Test', recipient: '44700011122', text: 'This is a test message' ) ], scheduleDateTime: new DateTime('+5 minutes', new DateTimeZone('Asia/Manila')) );
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.