mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 18:34:30 -04:00
Working on API
This commit is contained in:
parent
561907ae60
commit
d42712204c
@ -13,7 +13,7 @@ return array(
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'debug' => true,
|
'debug' => false,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -16,12 +16,16 @@ class ClientApiController extends \BaseController {
|
|||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$clients = Client::scope()->get()->toArray();
|
$clients = Client::scope()->get();
|
||||||
|
|
||||||
return Response::json(array(
|
$response = [
|
||||||
'error' => false,
|
'status' => 200,
|
||||||
'clients' => $clients),
|
'error' => false,
|
||||||
200
|
'clients' => $clients->toArray()
|
||||||
);
|
];
|
||||||
|
|
||||||
|
$response = json_encode($response, JSON_PRETTY_PRINT);
|
||||||
|
|
||||||
|
return Response::make($response, 200, ['Content-Type' => 'application/json']);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user