D
D
Dimon3x2019-01-19 22:06:20
Laravel
Dimon3x, 2019-01-19 22:06:20

How to view sent notification?

I have created a notification which is written to the db.
But there really is no information.
5c4374de4621e843506859.jpeg
How can I see it?
and why is the data field the same content?

public function toDatabase($notifiable)
    {
        return [
            'order_id' => $this->details['order_id']
        ];
    }

public function sendNotification()
    {
  
        $user = User::first();
  
        $details = [
            'greeting' => 'Hi Artisan',
            'body' => 'This is my first notification from ItSolutionStuff.com',
            'thanks' => 'Thank you for using ItSolutionStuff.com tuto!',
            'actionText' => 'View My Site',
            'actionURL' => url('/'),
            'order_id' => 101
        ];
  
        Notification::send($user, new MyFirstNotification($details));
   
        dd('done');
    }

For example, I want to make a notification that a post has comments

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vism, 2019-01-20
@vism

Are you freaking out? where does 'order_id' => 101 come from???
Quit programming, you have to read what you write and think and try.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question