From the course: Advanced Laravel
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Send notifications - Laravel Tutorial
From the course: Advanced Laravel
Send notifications
- [Instructor] What we sent just now is in fact a notification. Laravel provides support for sending notifications across a variety of delivery channels, including email, SMS, and Slack as well at the same time. You can even store the notifications in the database and display them within your app. In this video, we will explore the email channel and send the same class canceled email using notifications instead. First, generate a notification. Sail artisan make notification, class canceled notification. Open the class. Note that this suffix is actually not required, but I'm using it to avoid confusion. We have too many classes that says class canceled. So now open this, scroll down, and you will see this wire method. This is used to specify the channels to deliver the notifications. By default, mail is included. If you choose email as a channel, you need to define this to mail method which is also included…