Questions tagged [laravel-notification]

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.

143 questions
52
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…
Neel
  • 9,352
  • 23
  • 87
  • 128
51
votes
7 answers

How to change From Name in Laravel Mail Notification

This is the problem: The name associated with the email shows up as "Example"
12
votes
3 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…
Mohamed Wannous
  • 181
  • 1
  • 2
  • 11
12
votes
6 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…
Neel
  • 9,352
  • 23
  • 87
  • 128
10
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("…
Jishad
  • 2,876
  • 8
  • 33
  • 62
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' =>…
Ying
  • 1,282
  • 4
  • 19
  • 34
8
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…
Neel
  • 9,352
  • 23
  • 87
  • 128
7
votes
3 answers

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, …
John Smith
  • 1,204
  • 3
  • 22
  • 42
6
votes
4 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…
Gustavo Bissolli
  • 1,551
  • 3
  • 22
  • 36
6
votes
4 answers

Laravel is sending mail using my old email configuration

I've changed my e-mail configuration in the .env file but when I'm trying to send a mail, it's using my old configuration. I've tried some commands: php artisan clear-compiled, php artisan cache:clear, and php artisan config:clear but it still…
don_jon
  • 113
  • 3
  • 11
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 :
Maxime Brunet
  • 143
  • 1
  • 9
5
votes
2 answers

Laravel Notification Want to use view html in notification blade template

I'm using Laravel version 5.7.20 to build a custom markdown template. The template is copied from /resources/views/vendor/notifications/email.blade.php which is generated after issuing the command php artisan vendor:publish…
Shiro
  • 7,344
  • 8
  • 46
  • 80
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?
5
votes
2 answers

Add a second action or a link to a Laravel Notification

I am sending a notification using Laravel and am having trouble figuring out how to send a second action. Here is my code for the toMail method: public function toMail($notifiable) { return (new MailMessage) …
Aaron
  • 4,380
  • 19
  • 85
  • 141
5
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.
lewis4u
  • 14,256
  • 18
  • 107
  • 148
1
2 3
9 10