interface ContextualBindingBuilder (View source)

Methods

$this
needs(string $abstract)

Define the abstract target that depends on the context.

void
give(Closure|string $implementation)

Define the implementation for the contextual binding.

Details

$this needs(string $abstract)

Define the abstract target that depends on the context.

Parameters

string $abstract

Return Value

$this

void give(Closure|string $implementation)

Define the implementation for the contextual binding.

Parameters

Closure|string $implementation

Return Value

void

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.