mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-11 21:52:35 +01:00
27 lines
479 B
PHP
27 lines
479 B
PHP
|
<?php
|
||
|
|
||
|
use ninja\repositories\ClientRepository;
|
||
|
use Client;
|
||
|
|
||
|
class ClientApiController extends \BaseController {
|
||
|
|
||
|
protected $clientRepo;
|
||
|
|
||
|
public function __construct(ClientRepository $clientRepo)
|
||
|
{
|
||
|
parent::__construct();
|
||
|
|
||
|
$this->clientRepo = $clientRepo;
|
||
|
}
|
||
|
|
||
|
public function index()
|
||
|
{
|
||
|
$clients = Client::scope()->get()->toArray();
|
||
|
|
||
|
return Response::json(array(
|
||
|
'error' => false,
|
||
|
'clients' => $clients),
|
||
|
200
|
||
|
);
|
||
|
}
|
||
|
}
|