InteractsWithContainer
trait InteractsWithContainer (View source)
Properties
| protected Mix|null | $originalMix | The original Laravel Mix handler. |
Methods
Register an instance of an object in the container.
Register an instance of an object in the container.
Mock a partial instance of an object in the container.
Register an empty handler for Laravel Mix in the container.
Register an empty handler for Laravel Mix in the container.
Details
protected object
swap(string $abstract, object $instance)
Register an instance of an object in the container.
protected object
instance(string $abstract, object $instance)
Register an instance of an object in the container.
protected MockInterface
mock(string $abstract, Closure $mock = null)
Mock an instance of an object in the container.
protected MockInterface
partialMock(string $abstract, Closure $mock = null)
Mock a partial instance of an object in the container.
protected MockInterface
spy(string $abstract, Closure $mock = null)
Spy an instance of an object in the container.
protected $this
withoutMix()
Register an empty handler for Laravel Mix in the container.
protected $this
withMix()
Register an empty handler for Laravel Mix in the container.
Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.