PHP Класс Laravel\Lumen\Http\ResponseFactory

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

download() публичный Метод

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
Результат Symfony\Component\HttpFoundation\BinaryFileResponse

json() публичный Метод

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
Результат Illuminate\Http\JsonResponse;

make() публичный Метод

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
Результат Illuminate\Http\Response