1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-19 09:32:43 +01:00
invoiceninja/app/Http/Controllers/Contact/InvoiceController.php
Benjamin Beganović ae88d5e08e php-cs-fixer format
2020-11-25 15:19:52 +01:00

48 lines
1.0 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\Response;
class InvoiceController extends BaseController
{
use MakesHash;
protected $entity_type = Invoice::class;
protected $entity_transformer = InvoiceTransformer::class;
public function __construct()
{
parent::__construct();
}
/**
* List Invoices.
*
* @param InvoiceFilters $filters The filters
*
* @return Response
*/
public function index(InvoiceFilters $filters)
{
$invoices = Invoice::filter($filters);
return $this->listResponse($invoices);
}
}