Notification.php
2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
namespace Illuminate\Support\Facades;
use Illuminate\Notifications\AnonymousNotifiable;
use Illuminate\Notifications\ChannelManager;
use Illuminate\Support\Testing\Fakes\NotificationFake;
/**
* @method static \Illuminate\Notifications\ChannelManager locale(string|null $locale)
* @method static \Illuminate\Support\Collection sent(mixed $notifiable, string $notification, callable $callback = null)
* @method static bool hasSent(mixed $notifiable, string $notification)
* @method static mixed channel(string|null $name = null)
* @method static void assertNotSentTo(mixed $notifiable, string $notification, callable $callback = null)
* @method static void assertNothingSent()
* @method static void assertSentTo(mixed $notifiable, string $notification, callable $callback = null)
* @method static void assertSentToTimes(mixed $notifiable, string $notification, int $times = 1)
* @method static void assertTimesSent(int $expectedCount, string $notification)
* @method static void send(\Illuminate\Support\Collection|array|mixed $notifiables, $notification)
* @method static void sendNow(\Illuminate\Support\Collection|array|mixed $notifiables, $notification)
*
* @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;
}
}