48 lines
1.1 KiB
PHP
48 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Illuminate\Support\Facades;
|
|
|
|
use Illuminate\Notifications\ChannelManager;
|
|
use Illuminate\Notifications\AnonymousNotifiable;
|
|
use Illuminate\Support\Testing\Fakes\NotificationFake;
|
|
|
|
/**
|
|
* @see \Illuminate\Notifications\ChannelManager
|
|
*/
|
|
class Notification extends Facade
|
|
{
|
|
/**
|
|
* Replace the bound instance with a fake.
|
|
*
|
|
* @return \Illuminate\Support\Testing\Fakes\NotificationFake
|
|
*/
|
|
public static function fake()
|
|
{
|
|
static::swap($fake = new NotificationFake);
|
|
|
|
return $fake;
|
|
}
|
|
|
|
/**
|
|
* Begin sending a notification to an anonymous notifiable.
|
|
*
|
|
* @param string $channel
|
|
* @param mixed $route
|
|
* @return \Illuminate\Notifications\AnonymousNotifiable
|
|
*/
|
|
public static function route($channel, $route)
|
|
{
|
|
return (new AnonymousNotifiable)->route($channel, $route);
|
|
}
|
|
|
|
/**
|
|
* Get the registered name of the component.
|
|
*
|
|
* @return string
|
|
*/
|
|
protected static function getFacadeAccessor()
|
|
{
|
|
return ChannelManager::class;
|
|
}
|
|
}
|