mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-11 05:32:39 +01:00
957ac9f5d8
* Remove unnecessary save() on invoice * Update copyright * Working on Credit Repository * Implement credits as a paymentable entity * Add credit_id to transformer * fix rules for update payment * Fix random deleted_at keys in transformers * Fix for password_protect check
48 lines
1.1 KiB
PHP
48 lines
1.1 KiB
PHP
<?php
|
|
/**
|
|
* Invoice Ninja (https://invoiceninja.com)
|
|
*
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
*
|
|
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
|
|
*
|
|
* @license https://opensource.org/licenses/AAL
|
|
*/
|
|
|
|
namespace App\Http\Controllers\Contact;
|
|
|
|
use App\Filters\InvoiceFilters;
|
|
use App\Http\Controllers\BaseController;
|
|
use App\Models\Invoice;
|
|
use App\Transformers\Contact\InvoiceTransformer;
|
|
use App\Utils\Traits\MakesHash;
|
|
use Illuminate\Http\Request;
|
|
|
|
class InvoiceController extends BaseController
|
|
{
|
|
use MakesHash;
|
|
|
|
protected $entity_type = Invoice::class;
|
|
|
|
protected $entity_transformer = InvoiceTransformer::class;
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
|
|
/**
|
|
* List Invoices
|
|
*
|
|
* @param \App\Filters\InvoiceFilters $filters The filters
|
|
*
|
|
* @return \Illuminate\Http\Response
|
|
*/
|
|
public function index(InvoiceFilters $filters)
|
|
{
|
|
$invoices = Invoice::filter($filters);
|
|
|
|
return $this->listResponse($invoices);
|
|
}
|
|
}
|