Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add from to sms.ru #7

Closed
bigperson opened this issue Mar 4, 2020 · 2 comments
Closed

Add from to sms.ru #7

bigperson opened this issue Mar 4, 2020 · 2 comments

Comments

@bigperson
Copy link

How to add parameter from?

@maximkou
Copy link
Contributor

maximkou commented Mar 4, 2020

Hi!

At this moment, package supports only passing this parameter at send time, to example:

$sender->send('<phone_number>', '<your_message>', [
    'from' => '<sender name here>'
]);

All options from this list is supported when using this way.

@maximkou
Copy link
Contributor

maximkou commented Mar 6, 2020

@bigperson Hi!

Just now i'm released version 0.8.0, which added ability to defining provider-wide parameters.
Now you can define default message parameters in config, for example:

// config/nutnet-laravel-sms.php
'providers' => [
    'smsru' => [
        // your other settings
        'message_defaults' => [
            'from' => '<sender name>'
        ]
    ]
],

and you can send messages simply:

// "from" parameter will be added automatically, if defined in "message_defaults" option in config
$sender->send('<phone_number>', '<your_message>');

Attention: configuration file format is changed, if you update to 0.8.0, dont forget to refresh it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants