ResponseFactory::json()

JsonResponse json(string|array $data = array(), int $status = 200, array $headers = array(), int $options) Return a new JSON response from the application. Parameters string|array $data int $status array $headers int $options Return Value JsonResponse

ResponseFactory::json()

JsonResponse json(string|array $data = array(), int $status = 200, array $headers = array(), int $options) Return a new JSON response from the application. Parameters string|array $data int $status array $headers int $options Return Value JsonResponse

ResponseFactory::hasMacro()

static bool hasMacro(string $name) Checks if macro is registered. Parameters string $name Return Value bool

ResponseFactory::file()

BinaryFileResponse file(SplFileInfo|string $file, array $headers = array()) Return the raw contents of a binary file. Parameters SplFileInfo|string $file array $headers Return Value BinaryFileResponse

ResponseFactory::download()

BinaryFileResponse download(SplFileInfo|string $file, string $name = null, array $headers = array(), string|null $disposition = 'attachment') Create a new file download response. Parameters SplFileInfo|string $file string $name array $headers string|null $disposition Return Value BinaryFileResponse

ResponseFactory::download()

BinaryFileResponse download(SplFileInfo|string $file, string $name = null, array $headers = array(), string|null $disposition = 'attachment') Create a new file download response. Parameters SplFileInfo|string $file string $name array $headers string|null $disposition Return Value BinaryFileResponse

ResponseFactory

ResponseFactory class ResponseFactory implements ResponseFactory (View source) Traits Macroable

ResponseFactory

ResponseFactory interface ResponseFactory (View source) Methods Response make(string $content = '', int $status = 200, array $headers = array()) Return a new response from the application. Response view(string $view, array $data = array(), int $status = 200, array $headers = array()) Return a new view response from the application. JsonResponse json(string|array $data = array(), int $status = 200, array $headers = array(), int $options) Return a new JSON response from the applic

Response::__toString()

string __toString() Get the string representation of the message. Return Value string

Response::__construct()

__construct(string|null $message = null) Create a new response. Parameters string|null $message