Response
class Response (View source)
Traits
MacroableTrait |
Properties
static protected array | $macros | The registered string macros. | from MacroableTrait |
Methods
static void | macro(string $name, callable $macro) Register a custom macro. | from MacroableTrait |
static boolean | hasMacro(string $name) Checks if macro is registered | from MacroableTrait |
static mixed | __callStatic(string $method, array $parameters) Dynamically handle calls to the class. | from MacroableTrait |
mixed | __call(string $method, array $parameters) Dynamically handle calls to the class. | from MacroableTrait |
static Response | make(string $content = '', int $status = 200, array $headers = array()) Return a new response from the application. | |
static Response | view(string $view, array $data = array(), int $status = 200, array $headers = array()) Return a new view response from the application. | |
static JsonResponse | json(string|array $data = array(), int $status = 200, array $headers = array(), int $options) Return a new JSON response from the application. | |
static JsonResponse | jsonp(string $callback, string|array $data = [], int $status = 200, array $headers = [], int $options) Return a new JSONP response from the application. | |
static StreamedResponse | stream(Closure $callback, int $status = 200, array $headers = array()) Return a new streamed response from the application. | |
static BinaryFileResponse | download(SplFileInfo|string $file, string $name = null, array $headers = array(), null|string $disposition = 'attachment') Create a new file download response. |
Details
static void macro(string $name, callable $macro)
Register a custom macro.
static boolean hasMacro(string $name)
Checks if macro is registered
static mixed __callStatic(string $method, array $parameters)
Dynamically handle calls to the class.
mixed __call(string $method, array $parameters)
Dynamically handle calls to the class.
static Response make(string $content = '', int $status = 200, array $headers = array())
Return a new response from the application.
static Response view(string $view, array $data = array(), int $status = 200, array $headers = array())
Return a new view response from the application.
static JsonResponse json(string|array $data = array(), int $status = 200, array $headers = array(), int $options)
Return a new JSON response from the application.
static JsonResponse jsonp(string $callback, string|array $data = [], int $status = 200, array $headers = [], int $options)
Return a new JSONP response from the application.
static StreamedResponse stream(Closure $callback, int $status = 200, array $headers = array())
Return a new streamed response from the application.
static BinaryFileResponse download(SplFileInfo|string $file, string $name = null, array $headers = array(), null|string $disposition = 'attachment')
Create a new file download response.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/4.2/Illuminate/Support/Facades/Response.html