简体   繁体   中英

How can I send an nexmo SMS using livewire?

I have my codes working fine but the SMS is not sent to the mobile number. I am using livewire components and everywhere I'm searching about Nexmo sms notification, it about using controllers. How can I use livewire to send the sms

I've not actually played around with Livewire that much, but the reason that the examples in the PHP library you're using have controllers as sample code is because the controllers are where the logic is used to send a payload of data (in this case, the SMS data) to the Vonage servers.

Livewire is the frontend of your app, where you can define behaviour that replaces the traditional features of Javascript. What it sounds like you need to do is send a value back from the livewire templates to your Laravel controllers. Have a look at the Livewire docs here:

https://laravel-livewire.com/docs/2.x/actions

To see how to do actions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM