ControllerHelperTrait
trait ControllerHelperTrait
Controller helper trait.
Traits
Container aware trait.
Properties
Methods
mixed
__get(string $key)
Resolves item from the container using overloading.
from ContainerAwareTrait
fileResponse(string $file)
Returns a file response container.
redirectResponse(string $location, array $routeParams = [], array $queryParams = [], string $separator = '&', mixed $language = true)
Returns a redirect response container.
streamResponse(Closure $stream, string|null $contentType = null, string|null $charset = null)
Returns a stream response container.
jsonResponse(mixed $data, int $options = 0, int|null $status = null, string|null $charset = null)
Returns a JSON response builder.
Details
in ContainerAwareTrait at line 66
setContainer(Container $container)
Sets the container instance.
in ContainerAwareTrait at line 77
mixed
__get(string $key)
Resolves item from the container using overloading.
at line 30
protected File
fileResponse(string $file)
Returns a file response container.
at line 45
protected Redirect
redirectResponse(string $location, array $routeParams = [], array $queryParams = [], string $separator = '&', mixed $language = true)
Returns a redirect response container.
at line 63
protected Stream
streamResponse(Closure $stream, string|null $contentType = null, string|null $charset = null)
Returns a stream response container.
at line 77
protected JSON
jsonResponse(mixed $data, int $options = 0, int|null $status = null, string|null $charset = null)
Returns a JSON response builder.