I am trying to send notification to a particular mail id and is using the following code in my controller:
$product=Product::first();
Notification::route('mail','suraj@yahoo.com')
->notify(new NewProducts($product));
But I get an error
Call to undefined method Illuminate\Notifications\Channels\MailChannel::route()
.
All prerequisites are being added and I even successfully sent a mail when i used an object of my User model. I came across this process in laravel doc5.3.