for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Arcanedev\LaravelApiHelper\Contracts\Http;
/**
* Interface JsonResponse
*
* @package Arcanedev\LaravelApiHelper\Contracts\Http
* @author ARCANEDEV <[email protected]>
*/
interface JsonResponse
{
/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
* Respond with a success response.
* @param array $data
* @param int $status
* @param string $code
* @param array $headers
* @param int $options
* @return \Illuminate\Http\JsonResponse
public function success(array $data = [], $status = 200, $code = 'success', array $headers = [], $options = 0);
* Respond with an error response.
public function error(array $data = [], $status = 400, $code = 'error', array $headers = [], $options = 0);
* Respond with a json response.
public function respond(array $data, $status = 200, $code, array $headers = [], $options = 0);
}