mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Starting on the API
This commit is contained in:
parent
38008fa5c2
commit
561907ae60
27
app/controllers/ClientApiController.php
Normal file
27
app/controllers/ClientApiController.php
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?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
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -109,6 +109,11 @@ Route::group(array('before' => 'auth'), function()
|
|||||||
Route::post('credits/bulk', 'CreditController@bulk');
|
Route::post('credits/bulk', 'CreditController@bulk');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Route group for API versioning
|
||||||
|
Route::group(array('prefix' => 'api/v1', 'before' => 'auth.basic'), function()
|
||||||
|
{
|
||||||
|
Route::resource('clients', 'ClientApiController');
|
||||||
|
});
|
||||||
|
|
||||||
// If you're self hosting set this to a value you think is fair
|
// If you're self hosting set this to a value you think is fair
|
||||||
define('PRO_PLAN_PRICE', 50);
|
define('PRO_PLAN_PRICE', 50);
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
div > label.control-label
|
div > label.control-label
|
||||||
{
|
{
|
||||||
font-weight: bold !important;
|
font-weight: bold !important;
|
||||||
|
/* text-transform:uppercase; */
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<div class="headline">
|
<div class="headline">
|
||||||
<div class="icon open"><span class="img-wrap"><img src="{{ asset('images/icon-opensource.png') }}"></span></div><h2>Open Source Platform</h2>
|
<div class="icon open"><span class="img-wrap"><img src="{{ asset('images/icon-opensource.png') }}"></span></div><h2>Open Source Platform</h2>
|
||||||
</div>
|
</div>
|
||||||
<p class="first">Set the code free! Here at Invoice Ninja, we’re all about being non-evil, and providing full code transparency is a central manifestation of this value.</p>
|
<p class="first">Set the code free! Here at Invoice Ninja, we’re all about creating the best possible app, and inviting scrutiny via full code transparency is a central manifestation of this value.</p>
|
||||||
<p>Our users started seeing the benefits of open source within days of our launch, when we rolled out v1.0.2, which included some key code improvements that our friends on GitHub sent our way.
|
<p>Our users started seeing the benefits of open source within days of our launch, when we rolled out v1.0.2, which included some key code improvements that our friends on GitHub sent our way.
|
||||||
</p>
|
</p>
|
||||||
<p>We firmly believe that being an open source product helps everyone involved. We’re looking forward to seeing what the developers out there can do to take Invoice Ninja into new realms of usefulness.</p>
|
<p>We firmly believe that being an open source product helps everyone involved. We’re looking forward to seeing what the developers out there can do to take Invoice Ninja into new realms of usefulness.</p>
|
||||||
@ -43,10 +43,8 @@
|
|||||||
<div class="headline">
|
<div class="headline">
|
||||||
<div class="icon free"><span class="img-wrap"><img src="{{ asset('images/icon-free2.png') }}"></span></div><h2>FREE. Forever.</h2>
|
<div class="icon free"><span class="img-wrap"><img src="{{ asset('images/icon-free2.png') }}"></span></div><h2>FREE. Forever.</h2>
|
||||||
</div>
|
</div>
|
||||||
<p class="first">Set the code free! Here at Invoice Ninja, we’re all about being non-evil, and providing full code transparency is a central manifestation of this value.</p>
|
<p class="first">Yeah, you read that correctly. You don’t have to pay us a cent to use our tools. We know how tough it is to make ends meet as a web-based business, and we’re bent on providing a top-notch product that will do everything you need it to do, without any subscription or opt-in fees. </p>
|
||||||
<p>Our users started seeing the benefits of open source within days of our launch, when we rolled out v1.0.2, which included some key code improvements that our friends on GitHub sent our way.
|
<p>Try Invoice Ninja out. You literally have nothing to lose. We’re confident that you’ll find the experience so positive that you’ll never need to turn elsewhere.</p>
|
||||||
</p>
|
|
||||||
<p>We firmly believe that being an open source product helps everyone involved. We’re looking forward to seeing what the developers out there can do to take Invoice Ninja into new realms of usefulness.</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user