Laravel 9 Tutorial - Send SMS using Vonage in English

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys and welcome to laravel 9 tutorials so guys in this video we are going to discuss about how can we send SMS in laravel line using Vonage as you can see I have already created a notepad file right here on the desktop in which I have already defined all the necessary steps to make it simpler and easier to understand so yeah guys let's move to step number one which says that we need to create a fresh laravel project or you can use an existing project it's totally up to you so if you have laravel Global install you can simply use this command and if you don't have laravel Global install you need to use this command in this case I am going to name my project one Edge one because I already have a project with the name Vonage for that is that was related to Hindi and Urdu lecture so yeah so let's move to gitbash first of all I am going to copy this command because I am going to create a fresh laravel project and you can see I have already accessed the hddocs folder right here so I'm just going to paste laravel new and the project name hit enter so now this command is going to take some time for the execution so I'm just going to pause the video to save some time okay guys so our fresh larval project is ready so let me access that CD bone age one just like that okay let's move to step number two which says that we need to create a fresh account uh in my case I have already created that and if you are confused why do we call it bone age and next mode so just to inform you guys previously it was known as nexo and now it the name has been changed to Vonage okay so just keep that in mind so let's copy this one okay so let me tell you how can you create a fresh account for the Ownage so just paste it right here okay and then what you have to do is try it for free click on it okay then you are redirected to create an account page right here you need to fill your details uh email Etc country code and phone number which is the most important and then create a free account after that you will receive an email you need to confirm that email after confirming the email you will have uh two Euros in your account after that you will you will be asked to let's say which programming language do you use so you need to select the related one so okay in my case I have already created an account so let me just login right there so login and let's move here communication API and just write here communication API login so as you can see I have redirected to dashboard page so once you are let's say account is ready after confirming the email and after uh you can see the two pound balance right here see okay and after selecting the language you will be redirected right here so right here you can see API key API secret and now let's move to getting started part so let's move here getting started and then send an SMS right here you will see all the details and for different languages so curl node.js dot net Java PHP so in our case we will move to PHP and as you can see if you let's say you always think how do I create these notepad files so using these commands right here you can see it's already there okay so what you need to do is dig deep that's it so yeah guys step number three is done after confirming the evil and selecting the programming language now what you need to do is Step number four install the Vonage package so I can simply copy this part command or you can use this one is same copy and paste so let's move here in our project directory and let's paste it and let's hit enter now I'm going to pause the video once again to save some time okay guys so it's done as you can see now let's move to step number five which says that we need to create a controller so I have the command right here so let's copy it okay let's move to get bash and paste it right here directly and hit enter once it is done let's move to Sublime let's access our project first so file open folder and hddocs one H1 as you can see uh on it this is related to Hindi Urdu lecture so go next one just like that okay and let me close that one okay okay let's move to SMS controller okay and let's create a method to test our functionality so public function and let's say SMS would be the name of this method and that's about it now let's move to Google right here so after installing the library you can simply initialize it so I'm just going to copy this and you as you can see I have just copied this click on this copied link uh I'm showing you this again and again because I'm going to hide this from here because it contains my credentials okay so F12 to align it so I just copy it and pasted it right here okay after that I can you can simply change the code according to your need but in my case I will simply use this code so just click on copy and you can just paste it right here align the code that's about it so okay so first what we did is we installed the package we initialize the library right here here I have my API key API secret key and all of this information is saved in this variable basic and after that I am let's say calling the client I am creating another variable and I'm saving all my credentials let's say API can Secret in that one okay so right here in client so after that I'm creating a new variable right here I'm just sure let's say guiding you what is going on right here okay so after that we have created a new label response equals to client we are using this client with a creative credentials and we are simply sending the SMS with client SMS send and calling the package okay after that right here this field I'm going to hide it but here you will have your number okay and this will be related to two Fields so you are sending this SMS to this number okay after that you can Define your brand name so I'm just going to rename it to all about laravel about laravel just like that and the text message you can edit it up on your let's say according to your need a text message sent using the next voice so right here you can see the name next more and right here you can see the one it's so that's about it that's what I was talking about previously it was known as next so a text message sent using the next SMS API after that we are checking response response of the current status if we have uh if message get status is equals to equals to zero this means that the message was sent so Eco the message was sent successfully else the message failed with status and we are going to display the status right here so that's about it now it's time to test it and for that we need to create a route so let's move to web.php and I'm going to create a route route get and this time the route name would be SMS as well so yeah app HTTP controllers and controller name any gases SMS controller at the rate SMS the method name is SMS as well so yeah let's run our projects so PHP audition so hyphen hyphen port 8080 okay and now let's move to Google right here let's access our project okay and let's move to SMS okay okay so the message was sent successfully how can you verify it so let's move to analytics now analytics SMS analytics and overview so right here you can see we have multiple requests I was trying to test this package right here and right here as well uh I have this test also includes the uh let's say the test results of Hindi out the lecture so yeah just be aware so right here total seven for today okay so I'm just going to hit another one enter what I did was just a refresh okay so let's do a refresh right here as well so we can see the difference okay and right here you can see the count is now eight okay by day you can do that as well so by day uh today we have requested eight times now I'm just going to do one more so that you are so that there is no confusion left okay guys so one more time let's do a refresh and let's see now the count again and right here you can see nine okay there is one more thing you can also check the logs uh for example if you want to track the SMS that was sent so you can simply come to logs SMS logs okay and right here you can see the uh let's say request that were made today these are related to Hindi Urdu lecture as well okay just keep that in mind so from okay the brand name and the two are where we are sending this message to this specific number okay and the text message is right there okay okay guys so yeah guys that's about it and let's move here so just in case if you want to make a dynamic you what you need to do is you need to pass your variables right here that's about it so yeah guys that's about it from this specific video I hope you guys like this video if you liked it please like subscribe and share thank you take care and yes guys be ready for the next one okay take care
Info
Channel: All About Laravel
Views: 1,666
Rating: undefined out of 5
Keywords: All About Laravel, laravel, laravel 9, how to send sms in laravel, how to send sms in laravel using vonage, how to send sms in laravel using nexmo, Vonage send notification in laravel, Nexmo send notification in laravel, how to use summernote in laravel, laravel tutorials for beginners, laravel 9 tutorials, laravel tutorials in english, Vonage how to send sms in laravel, Nexmo how to send sms in laravel, Laravel tutorials, laravel for beginners, sms, vonage, laravel tutorials, msg
Id: Mhnb7aoctkg
Channel Id: undefined
Length: 9min 27sec (567 seconds)
Published: Thu May 04 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.