shikiryu/laravel-ovh-sms is a Laravel package for ovh wrapper for laravel.
It currently has 0 GitHub stars and 2 downloads on Packagist.
Install it with composer require shikiryu/laravel-ovh-sms.
Discover more Laravel packages by shikiryu
or browse all Laravel packages to compare alternatives.
Last updated
This package is an unofficial wrapper for OVH SMS Service intended for Laravel 5+.
This project used php-ovh api (https://github.com/ovh/php-ovh) - v2.0.1.
composer require okn/laravel-ovh-sms
config/app.php'providers' => [
// ...
Okn\OvhSms\OvhSmsServiceProvider::class
];
'aliases' => [
// ...
'OvhSms' => Okn\OvhSms\Facades\OvhSms::class
];
php artisan ovhsms:install
This command will create a default config file config/ovhsms.php.
Application keys must be defined in the .env file as follow:
OVHSMS_APP_KEY=
OVHSMS_APP_SECRET=
OVHSMS_CONSUMER_KEY=
OVHSMS_ENDPOINT=
OVHSMS_SERVICE_NAME=
To make this library works with your project you need to define
homogeneous routes rights (all ending with a trailing slash or none).
Default config add one (ex: /sms/*/jobs becomes /sms/*/jobs/), so to fit your rights you might add the following line in your .env file:
OVHSMS_TRAILING_SLASH=false
$sms = OneSignal::createMessage('This my sms. Can you read it ?');
$smsStatus = $sms->send(['+xxxxxxxxxxx']);
$sms->limitParts(1)->send(['+xxxxxxxxxxx']);
This will throw an exception if sms parts estimated number is greater than the limit you defined.
cURL error 60: SSL certificate problem...
cURL need an SSL certificate to communicate through https protocol.
Assuming you are using WAMP on Windows:
C:\Users\[MY-USERNAME]\cacert.pem)php.ini to add the path to the certificatecurl.cainfo = "C:\Users\[MY-USERNAME]\cacert.pem"
Now it should works, if it doesn't you might try the next solution.
In .env file you can add the following line:
OVHSMS_VERIFY_SSL=false