<?php
namespace Illuminate\Notifications;
use Illuminate\Contracts\Notifications\Dispatcher;
use InvalidArgumentException;
class AnonymousNotifiable
{
public $routes = [];
public function route($channel, $route)
{
if ($channel === 'database') {
throw new InvalidArgumentException('The database channel does not support on-demand notifications.');
}
$this->routes[$channel] = $route;
return $this;
}
public function notify($notification)
{
app(Dispatcher::class)->send($this, $notification);