PHP Class EllipseSynergie\ApiResponse\Laravel\Response

For the full copyright and license information, please view the LICENSE file that was distributed with this source code.
Author: Maxime Beaudoin ([email protected])
Inheritance: extends EllipseSynergie\ApiResponse\AbstractResponse
Afficher le fichier Open project: ellipsesynergie/api-response Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

errorWrongArgsValidator() public méthode

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
Résultat Illuminate\Contracts\Routing\ResponseFactory

withArray() public méthode

public withArray ( array $array, array $headers = [] ) : Illuminate\Contracts\Routing\ResponseFactory
$array array
$headers array
Résultat Illuminate\Contracts\Routing\ResponseFactory

withPaginator() public méthode

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
Résultat Illuminate\Contracts\Routing\ResponseFactory