class Mail extends Facade

Properties

static protected $app

The application instance being facaded.

from  Facade
static protected array $resolvedInstance

The resolved object instances.

from  Facade
static protected bool $cached

Indicates if the resolved instance should be cached.

from  Facade

Methods

static void
resolved(Closure $callback)

Run a Closure when the facade has been resolved.

from  Facade
static 
spy()

Convert the facade into a Mockery spy.

from  Facade
static 
partialMock()

Initiate a partial mock on the facade.

from  Facade
static 
shouldReceive()

Initiate a mock expectation on the facade.

from  Facade
static 
expects()

Initiate a mock expectation on the facade.

from  Facade
static 
createFreshMockInstance()

Create a fresh mock instance for the given class.

from  Facade
static 
createMock()

Create a fresh mock instance for the given class.

from  Facade
static bool
isMock()

Determines whether a mock is set as the instance of the facade.

from  Facade
static string|null
getMockableClass()

Get the mockable class for the bound instance.

from  Facade
static 
swap(mixed $instance)

Hotswap the underlying instance behind the facade.

from  Facade
static bool
isFake()

Determines whether a "fake" has been set as the facade instance.

from  Facade
static mixed
getFacadeRoot()

Get the root object behind the facade.

from  Facade
static string
getFacadeAccessor()

Get the registered name of the component.

static mixed
resolveFacadeInstance(string $name)

Resolve the facade root instance from the container.

from  Facade
static void
clearResolvedInstance(string|null $name = null)

Clear a resolved facade instance.

from  Facade
static void
clearResolvedInstances()

Clear all of the resolved instances.

from  Facade
static Collection
defaultAliases()

Get the application default aliases.

from  Facade
static 
getFacadeApplication()

Get the application instance behind the facade.

from  Facade
static void
setFacadeApplication(mixed $app)

Set the application instance.

from  Facade
static 
__callStatic(string $method, array $args)

Handle dynamic, static calls to the object.

from  Facade
static MailFake
fake()

Replace the bound instance with a fake.

static Mailer
mailer(UnitEnum|string|null $name = 'null')

No description

static Mailer
driver(UnitEnum|string|null $driver = 'null')

No description

static Mailer
build(array $config)

No description

static TransportInterface
createSymfonyTransport(array $config)

No description

static string
getDefaultDriver()

No description

static void
setDefaultDriver(UnitEnum|string $name)

No description

static void
purge(UnitEnum|string|null $name = 'null')

No description

static MailManager
extend(string $driver, Closure $callback, bool $poolable = 'false')

No description

static Container
getApplication()

No description

static MailManager
setApplication(Container $app)

No description

static MailManager
forgetMailers()

No description

static MailManager
setReleaseCallback(string $driver, Closure $callback)

No description

static Closure|null
getReleaseCallback(string $driver)

No description

static MailManager
addPoolable(string $driver)

No description

static MailManager
removePoolable(string $driver)

No description

static array
getPoolables()

No description

static MailManager
setPoolables(array $poolables)

No description

static PendingMail
to(mixed $users)

No description

static PendingMail
cc(mixed $users)

No description

static PendingMail
bcc(mixed $users)

No description

static SentMessage|null
raw(string $text, mixed $callback)

No description

static SentMessage|null
send(Mailable|array|string $view, array $data = '[]', Closure|string|null $callback = 'null')

No description

static SentMessage|null
sendNow(Mailable|array|string $mailable, array $data = '[]', Closure|string|null $callback = 'null')

No description

static void
assertSent(Closure|string $mailable, callable|array|string|int|null $callback = 'null')

No description

static void
assertSentTimes(string $mailable, int $times = '1')

No description

static void
assertNotOutgoing(Closure|string $mailable, callable|null $callback = 'null')

No description

static void
assertNotSent(Closure|string $mailable, callable|array|string|null $callback = 'null')

No description

static void
assertNothingOutgoing()

No description

static void
assertNothingSent()

No description

static void
assertQueued(Closure|string $mailable, callable|array|string|int|null $callback = 'null')

No description

static void
assertQueuedTimes(string $mailable, int $times = '1')

No description

static void
assertNotQueued(Closure|string $mailable, callable|array|string|null $callback = 'null')

No description

static void
assertNothingQueued()

No description

static void
assertSentCount(int $count)

No description

static void
assertQueuedCount(int $count)

No description

static void
assertOutgoingCount(int $count)

No description

static Collection
sent(Closure|string $mailable, callable|null $callback = 'null')

No description

static bool
hasSent(string $mailable)

No description

static Collection
queued(Closure|string $mailable, callable|null $callback = 'null')

No description

static bool
hasQueued(string $mailable)

No description

static mixed
queue(Mailable|array|string $view, string|null $queue = 'null')

No description

static mixed
later(DateTimeInterface|int $delay, Mailable|array|string $view, string|null $queue = 'null')

No description

Details

in Facade at line 55
static void resolved(Closure $callback)

Run a Closure when the facade has been resolved.

Boot-only. The callback is registered on the worker-global container and runs for every subsequent resolution of the facade accessor.

Parameters

Closure $callback

Return Value

void

in Facade at line 71
static spy()

Convert the facade into a Mockery spy.

in Facade at line 89
static partialMock()

Initiate a partial mock on the facade.

Tests only. Swaps the resolved facade instance for the worker lifetime.

in Facade at line 105
static shouldReceive()

Initiate a mock expectation on the facade.

Tests only. Swaps the resolved facade instance for the worker lifetime.

in Facade at line 121
static expects()

Initiate a mock expectation on the facade.

Tests only. Swaps the resolved facade instance for the worker lifetime.

in Facade at line 135
static protected createFreshMockInstance()

Create a fresh mock instance for the given class.

in Facade at line 147
static protected createMock()

Create a fresh mock instance for the given class.

in Facade at line 157
static protected bool isMock()

Determines whether a mock is set as the instance of the facade.

Return Value

bool

in Facade at line 168
static protected string|null getMockableClass()

Get the mockable class for the bound instance.

Return Value

string|null

in Facade at line 184
static swap(mixed $instance)

Hotswap the underlying instance behind the facade.

Tests only. Replaces the worker-wide resolved facade instance and container binding; runtime use races across coroutines and changes every subsequent facade call.

Parameters

mixed $instance

in Facade at line 196
static bool isFake()

Determines whether a "fake" has been set as the facade instance.

Return Value

bool

in Facade at line 207
static mixed getFacadeRoot()

Get the root object behind the facade.

Return Value

mixed

at line 75
static protected string getFacadeAccessor()

Get the registered name of the component.

Return Value

string

in Facade at line 223
static protected mixed resolveFacadeInstance(string $name)

Resolve the facade root instance from the container.

Parameters

string $name

Return Value

mixed

in Facade at line 246
static void clearResolvedInstance(string|null $name = null)

Clear a resolved facade instance.

Boot or tests only. Clears a worker-wide facade cache entry; concurrent coroutines may still hold the previous resolved instance.

Parameters

string|null $name

Return Value

void

in Facade at line 257
static void clearResolvedInstances()

Clear all of the resolved instances.

Boot or tests only. Clears the worker-wide facade cache; concurrent coroutines may still hold previously resolved instances.

Return Value

void

in Facade at line 265
static Collection defaultAliases()

Get the application default aliases.

Return Value

Collection

in Facade at line 324
static getFacadeApplication()

Get the application instance behind the facade.

in Facade at line 337
static void setFacadeApplication(mixed $app)

Set the application instance.

Tests only. Replaces the worker-wide facade application reference; runtime use races across coroutines and breaks every facade lookup.

Parameters

mixed $app

Return Value

void

in Facade at line 347
static __callStatic(string $method, array $args)

Handle dynamic, static calls to the object.

Parameters

string $method
array $args

Exceptions

RuntimeException

at line 61
static MailFake fake()

Replace the bound instance with a fake.

Return Value

MailFake

at line 56
static Mailer mailer(UnitEnum|string|null $name = 'null')

No description

Parameters

UnitEnum|string|null $name

Return Value

Mailer

at line 56
static Mailer driver(UnitEnum|string|null $driver = 'null')

No description

Parameters

UnitEnum|string|null $driver

Return Value

Mailer

at line 56
static Mailer build(array $config)

No description

Parameters

array $config

Return Value

Mailer

at line 56
static TransportInterface createSymfonyTransport(array $config)

No description

Parameters

array $config

Return Value

TransportInterface

at line 56
static string getDefaultDriver()

No description

Return Value

string

at line 56
static void setDefaultDriver(UnitEnum|string $name)

No description

Parameters

UnitEnum|string $name

Return Value

void

at line 56
static void purge(UnitEnum|string|null $name = 'null')

No description

Parameters

UnitEnum|string|null $name

Return Value

void

at line 56
static MailManager extend(string $driver, Closure $callback, bool $poolable = 'false')

No description

Parameters

string $driver
Closure $callback
bool $poolable

Return Value

MailManager

at line 56
static Container getApplication()

No description

Return Value

Container

at line 56
static MailManager setApplication(Container $app)

No description

Parameters

Container $app

Return Value

MailManager

at line 56
static MailManager forgetMailers()

No description

Return Value

MailManager

at line 56
static MailManager setReleaseCallback(string $driver, Closure $callback)

No description

Parameters

string $driver
Closure $callback

Return Value

MailManager

at line 56
static Closure|null getReleaseCallback(string $driver)

No description

Parameters

string $driver

Return Value

Closure|null

at line 56
static MailManager addPoolable(string $driver)

No description

Parameters

string $driver

Return Value

MailManager

at line 56
static MailManager removePoolable(string $driver)

No description

Parameters

string $driver

Return Value

MailManager

at line 56
static array getPoolables()

No description

Return Value

array

at line 56
static MailManager setPoolables(array $poolables)

No description

Parameters

array $poolables

Return Value

MailManager

at line 56
static PendingMail to(mixed $users)

No description

Parameters

mixed $users

Return Value

PendingMail

at line 56
static PendingMail cc(mixed $users)

No description

Parameters

mixed $users

Return Value

PendingMail

at line 56
static PendingMail bcc(mixed $users)

No description

Parameters

mixed $users

Return Value

PendingMail

at line 56
static SentMessage|null raw(string $text, mixed $callback)

No description

Parameters

string $text
mixed $callback

Return Value

SentMessage|null

at line 56
static SentMessage|null send(Mailable|array|string $view, array $data = '[]', Closure|string|null $callback = 'null')

No description

Parameters

Mailable|array|string $view
array $data
Closure|string|null $callback

Return Value

SentMessage|null

at line 56
static SentMessage|null sendNow(Mailable|array|string $mailable, array $data = '[]', Closure|string|null $callback = 'null')

No description

Parameters

Mailable|array|string $mailable
array $data
Closure|string|null $callback

Return Value

SentMessage|null

at line 56
static void assertSent(Closure|string $mailable, callable|array|string|int|null $callback = 'null')

No description

Parameters

Closure|string $mailable
callable|array|string|int|null $callback

Return Value

void

at line 56
static void assertSentTimes(string $mailable, int $times = '1')

No description

Parameters

string $mailable
int $times

Return Value

void

at line 56
static void assertNotOutgoing(Closure|string $mailable, callable|null $callback = 'null')

No description

Parameters

Closure|string $mailable
callable|null $callback

Return Value

void

at line 56
static void assertNotSent(Closure|string $mailable, callable|array|string|null $callback = 'null')

No description

Parameters

Closure|string $mailable
callable|array|string|null $callback

Return Value

void

at line 56
static void assertNothingOutgoing()

No description

Return Value

void

at line 56
static void assertNothingSent()

No description

Return Value

void

at line 56
static void assertQueued(Closure|string $mailable, callable|array|string|int|null $callback = 'null')

No description

Parameters

Closure|string $mailable
callable|array|string|int|null $callback

Return Value

void

at line 56
static void assertQueuedTimes(string $mailable, int $times = '1')

No description

Parameters

string $mailable
int $times

Return Value

void

at line 56
static void assertNotQueued(Closure|string $mailable, callable|array|string|null $callback = 'null')

No description

Parameters

Closure|string $mailable
callable|array|string|null $callback

Return Value

void

at line 56
static void assertNothingQueued()

No description

Return Value

void

at line 56
static void assertSentCount(int $count)

No description

Parameters

int $count

Return Value

void

at line 56
static void assertQueuedCount(int $count)

No description

Parameters

int $count

Return Value

void

at line 56
static void assertOutgoingCount(int $count)

No description

Parameters

int $count

Return Value

void

at line 56
static Collection sent(Closure|string $mailable, callable|null $callback = 'null')

No description

Parameters

Closure|string $mailable
callable|null $callback

Return Value

Collection

at line 56
static bool hasSent(string $mailable)

No description

Parameters

string $mailable

Return Value

bool

at line 56
static Collection queued(Closure|string $mailable, callable|null $callback = 'null')

No description

Parameters

Closure|string $mailable
callable|null $callback

Return Value

Collection

at line 56
static bool hasQueued(string $mailable)

No description

Parameters

string $mailable

Return Value

bool

at line 56
static mixed queue(Mailable|array|string $view, string|null $queue = 'null')

No description

Parameters

Mailable|array|string $view
string|null $queue

Return Value

mixed

at line 56
static mixed later(DateTimeInterface|int $delay, Mailable|array|string $view, string|null $queue = 'null')

No description

Parameters

DateTimeInterface|int $delay
Mailable|array|string $view
string|null $queue

Return Value

mixed