您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

Notification.php 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace Illuminate\Support\Facades;
  3. use Illuminate\Notifications\ChannelManager;
  4. use Illuminate\Notifications\AnonymousNotifiable;
  5. use Illuminate\Support\Testing\Fakes\NotificationFake;
  6. /**
  7. * @method static void send(\Illuminate\Support\Collection|array|mixed $notifiables, $notification)
  8. * @method static void sendNow(\Illuminate\Support\Collection|array|mixed $notifiables, $notification)
  9. * @method static mixed channel(string|null $name = null)
  10. * @method static \Illuminate\Notifications\ChannelManager locale(string|null $locale)
  11. *
  12. * @see \Illuminate\Notifications\ChannelManager
  13. */
  14. class Notification extends Facade
  15. {
  16. /**
  17. * Replace the bound instance with a fake.
  18. *
  19. * @return \Illuminate\Support\Testing\Fakes\NotificationFake
  20. */
  21. public static function fake()
  22. {
  23. static::swap($fake = new NotificationFake);
  24. return $fake;
  25. }
  26. /**
  27. * Begin sending a notification to an anonymous notifiable.
  28. *
  29. * @param string $channel
  30. * @param mixed $route
  31. * @return \Illuminate\Notifications\AnonymousNotifiable
  32. */
  33. public static function route($channel, $route)
  34. {
  35. return (new AnonymousNotifiable)->route($channel, $route);
  36. }
  37. /**
  38. * Get the registered name of the component.
  39. *
  40. * @return string
  41. */
  42. protected static function getFacadeAccessor()
  43. {
  44. return ChannelManager::class;
  45. }
  46. }