Cannot send a notification email in Lumen

710 Views Asked by At

I'm trying to send a notification email as follows:

$post= Post::findOrFail($id);

$user = new User(['email' => '[email protected]']);

$user->notify(new ReportPost($post));

But this isn't working for some reason. No error, but I'm not receiving any email. But if I fetch a user from the database and try the same thing, it will work. Any idea?

I'm using Lumen 5.3 and I've included the Mail and Notification package from Laravel 5.3

1

There are 1 best solutions below

0
Zaher On

You will need to install illuminate/notifications as Lumen does not support notifications out of the box

more can be found at https://stevethomas.com.au/php/using-laravel-notifications-in-lumen.html