1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 00:11:35 +02:00

Working on API

This commit is contained in:
Hillel Coren 2014-05-13 22:48:02 +03:00
parent 561907ae60
commit d42712204c
2 changed files with 11 additions and 7 deletions

View File

@ -13,7 +13,7 @@ return array(
|
*/
'debug' => true,
'debug' => false,
/*
|--------------------------------------------------------------------------

View File

@ -16,12 +16,16 @@ class ClientApiController extends \BaseController {
public function index()
{
$clients = Client::scope()->get()->toArray();
$clients = Client::scope()->get();
return Response::json(array(
'error' => false,
'clients' => $clients),
200
);
$response = [
'status' => 200,
'error' => false,
'clients' => $clients->toArray()
];
$response = json_encode($response, JSON_PRETTY_PRINT);
return Response::make($response, 200, ['Content-Type' => 'application/json']);
}
}