What I am trying to acheive - is create a database seeder for Laravel Notifications. As far as i am using database to store my notifications, there should be a way to achieve it. I am creating Factory model :
$user->notify(new NotificationEvent($event));
In fact it creates a notification in database, but artisan returns with error
[Symfony\Component\Debug\Exception\FatalThrowableError]
Call to undefined method Illuminate\Support\Facades\Notification::save()
Anybody knows what to do?
This seems to be a namespace issue, please try the following, place the class reference on top of your seed class:
use Notification;