PHP Class Laravel\Lumen\Http\ResponseFactory

Mostra file Open project: laravel/lumen-framework Class Usage Examples

Public Methods

Method Description
download ( SplFileInfo | string $file, string $name = null, array $headers = [], null | string $disposition = 'attachment' ) : BinaryFileResponse Create a new file download response.
json ( string | array $data = [], integer $status = 200, array $headers = [], integer $options ) : Illuminate\Http\JsonResponse; Return a new JSON response from the application.
make ( string $content = '', integer $status = 200, array $headers = [] ) : Illuminate\Http\Response Return a new response from the application.

Method Details

download() public method

Create a new file download response.
public download ( SplFileInfo | string $file, string $name = null, array $headers = [], null | string $disposition = 'attachment' ) : BinaryFileResponse
$file SplFileInfo | string
$name string
$headers array
$disposition null | string
return Symfony\Component\HttpFoundation\BinaryFileResponse

json() public method

Return a new JSON response from the application.
public json ( string | array $data = [], integer $status = 200, array $headers = [], integer $options ) : Illuminate\Http\JsonResponse;
$data string | array
$status integer
$headers array
$options integer
return Illuminate\Http\JsonResponse;

make() public method

Return a new response from the application.
public make ( string $content = '', integer $status = 200, array $headers = [] ) : Illuminate\Http\Response
$content string
$status integer
$headers array
return Illuminate\Http\Response