PHP Class App\Http\Controllers\Front\Api\Controller

Inheritance: extends app\http\controllers\Controller
Afficher le fichier Open project: spatie-custom/blender

Protected Properties

Свойство Type Description
$statusCode integer

Méthodes publiques

Méthode Description
getStatusCode ( ) : integer
respond ( array $data, array $headers = [] ) : Illuminate\Http\JsonResponse Set a response.
respondWithBadRequest ( string $message = 'Bad Request' ) : Illuminate\Http\Response Send a response with a bad request.
respondWithError ( string $message ) : Illuminate\Http\JsonResponse Respond with an error message.
respondWithInternalServerError ( string $message = 'Internal Server Error' ) : Illuminate\Http\Response Send a response with a internal server error code.
setStatusCode ( integer $statusCode )

Method Details

getStatusCode() public méthode

public getStatusCode ( ) : integer
Résultat integer

respond() public méthode

Set a response.
public respond ( array $data, array $headers = [] ) : Illuminate\Http\JsonResponse
$data array
$headers array
Résultat Illuminate\Http\JsonResponse

respondWithBadRequest() public méthode

Send a response with a bad request.
public respondWithBadRequest ( string $message = 'Bad Request' ) : Illuminate\Http\Response
$message string
Résultat Illuminate\Http\Response

respondWithError() public méthode

Respond with an error message.
public respondWithError ( string $message ) : Illuminate\Http\JsonResponse
$message string
Résultat Illuminate\Http\JsonResponse

respondWithInternalServerError() public méthode

Send a response with a internal server error code.
public respondWithInternalServerError ( string $message = 'Internal Server Error' ) : Illuminate\Http\Response
$message string
Résultat Illuminate\Http\Response

setStatusCode() public méthode

public setStatusCode ( integer $statusCode )
$statusCode integer

Property Details

$statusCode protected_oe property

protected int $statusCode
Résultat integer