Laravel provides support for sending notifications across a variety of delivery channels, including mail, SMS (via Nexmo), and Slack. These notifications are informational messages that notify users of something that occurred in your application.
Questions tagged [laravel-notification]
106 questions
44
votes
2 answers
Laravel 5.3 Notification Vs Mailable
I am a little confused about whether to use Laravel's Notification or Mailable class. From what I understand, Mailables are used to send only emails whereas Notifications can be used to send emails and sms. In my application, I dont have plans to…
![](../../users/profiles/1050957.webp)
Neel
- 8,044
- 21
- 75
- 119
42
votes
7 answers
How to change From Name in Laravel Mail Notification
This is the problem:
I need help for this one. Thanks
![](../../users/profiles/5391859.webp)
Masterpiece Mas Icang
- 431
- 1
- 5
- 10
11
votes
5 answers
Laravel 5.3 Send Notification to Users without an account
With the Laravel 5.3 Notification feature, I see that the notifications are sent to users like this:
$user->notify(new InvoicePaid($invoice));
Where I believe $user is the notifiable entity. What if I want to send notifications to users who doesn't…
![](../../users/profiles/1050957.webp)
Neel
- 8,044
- 21
- 75
- 119
9
votes
1 answer
Extracting data from notification database in Laravel
I was saved my notification into database like this:
public function toDatabase($notifiable)
{
return [
'from' => $this->message->name,
'name'=> $this->message->email,
'subject' =>…
![](../../users/profiles/4687904.webp)
Ying
- 952
- 2
- 11
- 24
9
votes
2 answers
Call to undefined method Illuminate\Notifications\Notification::send()
I am trying to make a notification system in my project.
These are the steps i have done:
1-php artisan notifications:table
2-php artisan migrate
3-php artisan make:notification AddPost
In my AddPost.php file i wrote this…
![](../../users/profiles/6304803.webp)
Mohamed Wannous
- 133
- 1
- 1
- 10
7
votes
3 answers
Laravel 5.3 How to show Username in Notifications Email
I am trying to add the user's first name in the notification emails. At the moment, Laravel notification emails starts like:
Hello,
And I want to change it to:
Hello Donald,
Right now, I have a set-up like this. This example is for a Password…
![](../../users/profiles/1050957.webp)
Neel
- 8,044
- 21
- 75
- 119
6
votes
1 answer
Laravel. How to get id of database notification?
I use database notifications, in notification code I have method toDatabase:
public function toDatabase($notifiable)
{
$user = \App\SomeUsers::where('id', $notifiable->id)->first();
return [
'message' => $message,
…
![](../../users/profiles/2653694.webp)
John Smith
- 922
- 14
- 34
6
votes
3 answers
Adding headers to email sent as a Laravel Notification
Someone knows how to add headers to emails sent through Laravel Notification System?
I am not talking about Mailable classes where I can set header through the withSwiftMessage() method!
I also would like to keep using the MailMessage once I have a…
![](../../users/profiles/2103584.webp)
Gustavo Bissolli
- 1,441
- 1
- 21
- 33
5
votes
2 answers
Error when trying to send a notification to my slack with Laravel 5.8
I try to send a simple slack notification on my channel to know when a customer buy something or register but i've got an error and i can't find any solution on the web.
That's my notification SlackNotification.php :
![](../../users/profiles/9262066.webp)
Jean Poutre
- 131
- 6
5
votes
1 answer
Laravel Notification - Call to a member function routeNotificationFor() on string
Laravel 5.5
Controller
public function sendBookingSms(){
$checkState = session()->get('checkState');
$staffs = Staff::whereIn('staffId',$checkState)->get();
foreach ($staffs as $staff) {
$email = str_replace("…
![](../../users/profiles/4091210.webp)
Jishad
- 2,375
- 5
- 25
- 55
5
votes
1 answer
What is the reason behind uuid in laravel notifications
What is the reason uuid is the id in the notification system?
![](../../users/profiles/5672377.webp)
Behrooz Valikhani
- 65
- 7
4
votes
1 answer
Laravel Notifications - delay email sending and cancel if condition met
I have an app where I am sending a push notification which is fine if the user is logged into the application - however, if they're not / if they have not read the notification within X minutes I'd like to send them an email.
The way I am going…
![](../../users/profiles/504487.webp)
Chris
- 1,621
- 1
- 17
- 32
4
votes
2 answers
Laravel: How to modify notifications collection
I've got a function which returns database notifications of a user (the User model is Notifiable):
return $user->notifications()->get();
The result returned is like this:
[
{
"id": "5d6548d3-1f9b-4da5-b332-afbf428df775",
"type":…
![](../../users/profiles/69537.webp)
B Faley
- 14,391
- 34
- 113
- 191
4
votes
1 answer
How to use multiple slack webhook for laravel notifications
I am trying to send slack messages through laravel notification.
when events such as signed up, leave , and etc. happen using different channels.
But there's a problem here, because Laravel only supports one Hook URI or I just do not know how to set…
![](../../users/profiles/6032808.webp)
Hax0r
- 1,374
- 4
- 20
- 38
4
votes
1 answer
Laravel 5.3 notifications message customize
I would like to customize this notification email message:
but i can't find where to change the parts marked with red color on my screenshot.
The "Regards" and the message at the bottom.
![](../../users/profiles/2502731.webp)
lewis4u
- 11,579
- 13
- 79
- 118