class Illuminate / Routing / ResponseFactory
You are viewing an older version of the documentation. For the latest, please visit master documentation.

ResponseFactory

Implements

Uses

Properties

protected

$view Factory

The view factory instance.

Default: null
protected

$redirector Redirector

The redirector instance.

Default: null

Methods

public

__construct ( Factory $view , Redirector $redirector ) : void

Create a new response factory instance.

Parameters

public

make ( $content , $status , array $headers ) : Response

Create a new response instance.

Parameters

  • $content mixed
  • $status int
  • $headers array
public

noContent ( $status , array $headers ) : Response

Create a new "no content" response.

Parameters

  • $status int
  • $headers array
public

view ( $view , $data , $status , array $headers ) : Response

Create a new response for a given view.

Parameters

  • $view string|array
  • $data array
  • $status int
  • $headers array
public

json ( $data , $status , array $headers , $options ) : JsonResponse

Create a new JSON response instance.

Parameters

  • $data mixed
  • $status int
  • $headers array
  • $options int
public

jsonp ( $callback , $data , $status , array $headers , $options ) : JsonResponse

Create a new JSONP response instance.

Parameters

  • $callback string
  • $data mixed
  • $status int
  • $headers array
  • $options int
public

stream ( $callback , $status , array $headers ) : Symfony\...\StreamedResponse

Create a new streamed response instance.

Parameters

  • $callback Closure
  • $status int
  • $headers array
public

streamDownload ( $callback , $name , array $headers , $disposition ) : Symfony\...\StreamedResponse

Create a new streamed response instance as a file download.

Parameters

  • $callback Closure
  • $name string|null
  • $headers array
  • $disposition string|null
public

download ( $file , $name , array $headers , $disposition ) : Symfony\...\BinaryFileResponse

Create a new file download response.

Parameters

  • $file SplFileInfo |string
  • $name string|null
  • $headers array
  • $disposition string|null
protected

fallbackName ( $name ) : string

Convert the string to ASCII characters that are equivalent to the given name.

Parameters

  • $name string
public

file ( $file , array $headers ) : Symfony\...\BinaryFileResponse

Return the raw contents of a binary file.

Parameters

public

redirectTo ( $path , $status , $headers , $secure ) : RedirectResponse

Create a new redirect response to the given path.

Parameters

  • $path string
  • $status int
  • $headers array
  • $secure bool|null
public

redirectToRoute ( $route , $parameters , $status , $headers ) : RedirectResponse

Create a new redirect response to a named route.

Parameters

  • $route string
  • $parameters mixed
  • $status int
  • $headers array
public

redirectToAction ( $action , $parameters , $status , $headers ) : RedirectResponse

Create a new redirect response to a controller action.

Parameters

  • $action string
  • $parameters mixed
  • $status int
  • $headers array
public

redirectGuest ( $path , $status , $headers , $secure ) : RedirectResponse

Create a new redirect response, while putting the current URL in the session.

Parameters

  • $path string
  • $status int
  • $headers array
  • $secure bool|null
public

redirectToIntended ( $default , $status , $headers , $secure ) : RedirectResponse

Create a new redirect response to the previously intended location.

Parameters

  • $default string
  • $status int
  • $headers array
  • $secure bool|null