App\Http\Controllers\Front\Api\Controller::respondWithError PHP Method

respondWithError() public method

Respond with an error message.
public respondWithError ( string $message ) : Illuminate\Http\JsonResponse
$message string
return Illuminate\Http\JsonResponse
    public function respondWithError($message)
    {
        return $this->respond(['error' => $message, 'status_code' => $this->getStatusCode()]);
    }