PHP 클래스 EllipseSynergie\ApiResponse\Laravel\Response

For the full copyright and license information, please view the LICENSE file that was distributed with this source code.
저자: Maxime Beaudoin ([email protected])
상속: extends EllipseSynergie\ApiResponse\AbstractResponse
파일 보기 프로젝트 열기: ellipsesynergie/api-response 1 사용 예제들

공개 메소드들

메소드 설명
errorWrongArgsValidator ( Illuminate\Contracts\Validation\Validator $validator ) : Illuminate\Contracts\Routing\ResponseFactory Generates a Response with a 400 HTTP header and a given message from validator
withArray ( array $array, array $headers = [] ) : Illuminate\Contracts\Routing\ResponseFactory
withPaginator ( Illuminate\Contracts\Pagination\LengthAwarePaginator $paginator, callable | League\Fractal\TransformerAbstract $transformer, string $resourceKey = null, array $meta = [] ) : Illuminate\Contracts\Routing\ResponseFactory Respond with a paginator, and a transformer.

메소드 상세

errorWrongArgsValidator() 공개 메소드

Generates a Response with a 400 HTTP header and a given message from validator
public errorWrongArgsValidator ( Illuminate\Contracts\Validation\Validator $validator ) : Illuminate\Contracts\Routing\ResponseFactory
$validator Illuminate\Contracts\Validation\Validator
리턴 Illuminate\Contracts\Routing\ResponseFactory

withArray() 공개 메소드

public withArray ( array $array, array $headers = [] ) : Illuminate\Contracts\Routing\ResponseFactory
$array array
$headers array
리턴 Illuminate\Contracts\Routing\ResponseFactory

withPaginator() 공개 메소드

Respond with a paginator, and a transformer.
public withPaginator ( Illuminate\Contracts\Pagination\LengthAwarePaginator $paginator, callable | League\Fractal\TransformerAbstract $transformer, string $resourceKey = null, array $meta = [] ) : Illuminate\Contracts\Routing\ResponseFactory
$paginator Illuminate\Contracts\Pagination\LengthAwarePaginator
$transformer callable | League\Fractal\TransformerAbstract
$resourceKey string
$meta array
리턴 Illuminate\Contracts\Routing\ResponseFactory