You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Mail.php 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace Illuminate\Support\Facades;
  3. use Illuminate\Support\Testing\Fakes\MailFake;
  4. /**
  5. * @method static \Illuminate\Mail\PendingMail to($users)
  6. * @method static \Illuminate\Mail\PendingMail bcc($users)
  7. * @method static void raw(string $text, $callback)
  8. * @method static void send(string|array|\Illuminate\Contracts\Mail\Mailable $view, array $data = [], \Closure|string $callback = null)
  9. * @method static array failures()
  10. * @method static mixed queue(string|array|\Illuminate\Contracts\Mail\Mailable $view, string $queue = null)
  11. * @method static mixed later(\DateTimeInterface|\DateInterval|int $delay, string|array|\Illuminate\Contracts\Mail\Mailable $view, string $queue = null)
  12. * @method static void assertSent(string $mailable, \Closure|string $callback = null)
  13. * @method static void assertNotSent(string $mailable, \Closure|string $callback = null)
  14. * @method static void assertNothingSent()
  15. * @method static void assertQueued(string $mailable, \Closure|string $callback = null)
  16. * @method static void assertNotQueued(string $mailable, \Closure|string $callback = null)
  17. * @method static void assertNothingQueued()
  18. * @method static \Illuminate\Support\Collection sent(string $mailable, \Closure|string $callback = null)
  19. * @method static bool hasSent(string $mailable)
  20. * @method static \Illuminate\Support\Collection queued(string $mailable, \Closure|string $callback = null)
  21. * @method static bool hasQueued(string $mailable)
  22. *
  23. * @see \Illuminate\Mail\Mailer
  24. * @see \Illuminate\Support\Testing\Fakes\MailFake
  25. */
  26. class Mail extends Facade
  27. {
  28. /**
  29. * Replace the bound instance with a fake.
  30. *
  31. * @return \Illuminate\Support\Testing\Fakes\MailFake
  32. */
  33. public static function fake()
  34. {
  35. static::swap($fake = new MailFake);
  36. return $fake;
  37. }
  38. /**
  39. * Get the registered name of the component.
  40. *
  41. * @return string
  42. */
  43. protected static function getFacadeAccessor()
  44. {
  45. return 'mailer';
  46. }
  47. }